Reg: PIL2.4 Error: AttributeError: pixel_access

K

Kottiyath

Hi all,
I am facing the following problem in PIL 2.4:
Code:
img = ImageGrab.grab()
img.save("image2.jpg")

Error:
img.save("image2.jpg")
File "C:\Python24\Lib\site-packages\PIL\Image.py", line 1372, in
save
self.load()
File "C:\Python24\Lib\site-packages\PIL\Image.py", line 599, in load
return self.im.pixel_access(self.readonly)
AttributeError: pixel_access

When I googled this error, I saw that such an error could be because
of some botched installation. So, I re-installed PIL. But still this
error persists.

The version is1.1.6

I had installed PIL in Python2.5 earlier and had done image capture
also. But I need to go back to Python2.4 (because pymedia exe is
available for only python2.4) and now I am facing this issue.

I am pretty new to application programming, so if someone can help me
out, it would be very helpful.

Regards,
Kottiyath
 
K

Kottiyath

Hi all,
    I am facing the following problem in PIL 2.4:
Code:
img = ImageGrab.grab()
img.save("image2.jpg")

Error:
    img.save("image2.jpg")
  File "C:\Python24\Lib\site-packages\PIL\Image.py", line 1372, in
save
    self.load()
  File "C:\Python24\Lib\site-packages\PIL\Image.py", line 599, in load
    return self.im.pixel_access(self.readonly)
AttributeError: pixel_access

When I googled this error, I saw that such an error could be because
of some botched installation. So, I re-installed PIL. But still this
error persists.

The version is>>> print Image.VERSION

1.1.6

I had installed PIL in Python2.5 earlier and had done image capture
also. But I need to go back to Python2.4 (because pymedia exe is
available for only python2.4) and now I am facing this issue.

I am pretty new to application programming, so if someone can help me
out, it would be very helpful.

Regards,
Kottiyath

Hi all,
I could solve it myself.
Just FI, if somebody else faces the same issue.
The issue was that I had installed many other 3rd party tools. One
of those (I havent found out which - later it is going to bite me )
has overridden the _imaging.pyd (in linux it would be _imaging.so)
file in PythonXX/DLLs directory with its version. I deleted the
_imaging.pyd and _imaginft.pyd from PythonXX/DLLs and now PIL takes
the data from site-packages/PIL/_imaging.pyd itself.

Regards
K
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top