PIL throws exception when reading bitmap/pnm data
Cameron Walsh
cameron.walsh at gmail.com
Thu Nov 30 20:42:41 EST 2006
Cameron Walsh wrote:
> Hi all,
>
> I'm trying to extract the data from a bitmap or .pnm file using the
> following code:
>
> import Image
> img = Image.open("test.bmp","r")
> data=img.getdata()
>
> Unfortunately I get the following exception on Linux, but not on Windows:
>
>>>> data=img.getdata()
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/local/lib/python2.5/site-packages/PIL/Image.py", line 796,
> in getdata
> self.load()
> File "/usr/local/lib/python2.5/site-packages/PIL/ImageFile.py", line
> 147, in load
> self.map = mmap.mmap(file.fileno(), size)
> EnvironmentError: [Errno 19] No such device
>
<SNIP>
>
>
> Thanks and regards,
>
> Cameron.
Hi all,
It turns out the problem only arose when the file was on an NTFS drive
mounted as NTFS-3g. Copying it to my home directory fixed the problem.
Who do I send the bug report to, the ntfs-3g or the PIL guys?
Regards,
Cameron.
More information about the Python-list
mailing list