Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'win32': 0.03; 'importing': 0.05; 'that?': 0.05; 'error:': 0.07; 'importerror:': 0.07; 'subject:Error': 0.07; 'failed:': 0.09; 'image,': 0.09; 'pil': 0.09; 'received:67.192': 0.09; 'received:67.192.241': 0.09; 'received:dfw.emailsrvr.com': 0.09; 'subject:trying': 0.09; 'issue?': 0.16; 'pil.': 0.16; 'subject:image': 0.16; 'subject:when': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'import': 0.22; 'load': 0.23; 'header:User-Agent:1': 0.23; 'error': 0.23; 'dll': 0.24; 'received:emailsrvr.com': 0.24; 'received:(smtp server)': 0.26; 'skip:" 40': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "i'm": 0.30; 'gary': 0.31; 'img': 0.31; 'file': 0.32; 'open': 0.33; 'core': 0.34; 'problem': 0.35; 'but': 0.35; 'skip:" 50': 0.36; 'skip:& 10': 0.38; 'follows:': 0.38; 'to:addr:python- list': 0.38; '\xa0\xa0\xa0': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'solve': 0.60; 'charset:windows-1252': 0.65; 'message)': 0.84 X-Virus-Scanned: OK X-Sender-Id: gary.herron@islandtraining.com Date: Sun, 16 Nov 2014 13:02:45 -0800 From: Gary Herron User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Error when trying to open an image References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------060205040106050102000205" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 81 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416172331 news.xs4all.nl 2876 [2001:888:2000:d::a6]:60290 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:80904 This is a multi-part message in MIME format. --------------060205040106050102000205 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 > > from PIL import Image > File "C:\Python34\lib\site-packages\PIL\Image.py", line 62, in > 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 --------------060205040106050102000205 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
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 =3D Image.open('xyz.jpg')

But, got the following error:

File "C:/Users/abc/PycharmProjects/untitled/open_image.py", line 2, in <module>
=A0=A0=A0 from PIL import Image
=A0 File "C:\Python34\lib\site-packages\PIL\Image.py", line 62,= in <module>
=A0=A0=A0 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
--------------060205040106050102000205--