Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.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; 'that?': 0.05; 'error:': 0.07; 'importerror:': 0.07; 'subject:Error': 0.07; 'failed:': 0.09; 'pil': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:trying': 0.09; 'jan': 0.12; 'issue?': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:image': 0.16; 'subject:when': 0.16; 'traceback.': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'import': 0.22; 'load': 0.23; 'header:User- Agent:1': 0.23; 'dll': 0.24; 'instead.': 0.24; 'skip:" 40': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; "i'm": 0.30; 'posting': 0.31; 'img': 0.31; 'file': 0.32; 'open': 0.33; 'core': 0.34; 'skip:" 50': 0.36; 'follows:': 0.38; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'solve': 0.60; 'received:fios.verizon.net': 0.84; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Error when trying to open an image Date: Sun, 16 Nov 2014 18:31:24 -0500 References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-108-16-203-145.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: 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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416180714 news.xs4all.nl 2908 [2001:888:2000:d::a6]:54334 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:80931 On 11/16/2014 2:37 PM, 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 Answer is on line above. Good for you for posting traceback. > 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? PIL does not work with 3.x. Get pillow instead. -- Terry Jan Reedy