Error when trying to open an image

Gary Herron gary.herron at islandtraining.com
Sun Nov 16 16:02:45 EST 2014


On 11/16/2014 11:37 AM, Abdul Abdul wrote:
> Hello,
>
> I'm trying to open an image using the `Python Imaging Library` as follows:
>
> from PIL import Image
> img = Image.open('xyz.jpg')
>
> But, got the following error:
>
> File "C:/Users/abc/PycharmProjects/untitled/open_image.py", line 2, in 
> <module>
>     from PIL import Image
>   File "C:\Python34\lib\site-packages\PIL\Image.py", line 62, in <module>
>     from PIL import _imaging as core
> ImportError: DLL load failed: %1 is not a valid Win32 application.
>
> Why is that? How can I solve this issue?

... To be clearer, your problem is not with *opening* an image, but (if 
you look at the error message) its with importing PIL.

Gary Herron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20141116/8fc2e07e/attachment.html>


More information about the Python-list mailing list