Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone03.am1.xlned.com!bcyclone03.am1.xlned.com!newsfeed.xs4all.nl!newsfeed3.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; 'exit': 0.09; 'failed:': 0.09; 'here?': 0.09; 'pil': 0.09; 'seemed': 0.09; 'subject:trying': 0.09; 'cc:addr:python-list': 0.11; 'jan': 0.12; 'email addr:udel.edu>': 0.16; 'email name:<tjreedy': 0.16; 'issue?': 0.16; 'open()': 0.16; 'reedy': 0.16; 'subject:image': 0.16; 'subject:when': 0.16; 'traceback.': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'finished': 0.19; 'thanks.': 0.20; 'import': 0.22; 'cc:addr:python.org': 0.22; 'load': 0.23; 'dll': 0.24; 'instead.': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'skip:" 40': 0.26; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'skip:& 60': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'code': 0.31; 'posting': 0.31; 'reply.': 0.31; '3.x': 0.31; 'img': 0.31; 'file': 0.32; 'open': 0.33; 'worked': 0.33; 'url:python': 0.33; 'older': 0.33; 'core': 0.34; 'received:google.com': 0.35; 'version': 0.36; 'skip:" 50': 0.36; 'url:listinfo': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'so,': 0.37; 'skip:& 10': 0.38; 'follows:': 0.38; 'nov': 0.38; 'pm,': 0.38; 'does': 0.39; 'url:mail': 0.40; 'how': 0.40; 'solve': 0.60; 'kind': 0.63 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=yfJlQXFJRfKX4pMZDjVMtmadeQVa2A/D3mq5NbMNtVc=; b=lsM3cgVZ44tQE3A0vPTrb0mjYc6u6c+1BB0EykQBKa5XuUoZ9lczSSIdNo+i6qJwhQ YFRYbL8mcFxhdsNoUgRAYCC9K7vcr5E4yANWwkw1lEqndK46YOUjf2urR4qloENkB5Oz FpLsNxf+GblpLYM5ZW4orGu/LiM0AsyVSdAz/xwqxr20D3XatnekbrEH2RMDu2NZTfbo bl5boqDHcVITO2HBfPCi/suC//stRqVpxBAOn3aGqd9hipJ8GKjdPuRfhj32j0dsOhLo snJA4p6dk9BgsVe8+XRxZaXzGoNrTIDbNJHCgKyWk9NFTRjhWSn9MZQkz9pRYW+tSLNu 7GOg== MIME-Version: 1.0 X-Received: by 10.60.45.132 with SMTP id n4mr21257278oem.26.1416186181636; Sun, 16 Nov 2014 17:03:01 -0800 (PST) In-Reply-To: References: Date: Mon, 17 Nov 2014 02:03:01 +0100 Subject: Re: Error when trying to open an image From: Abdul Abdul To: Terry Reedy Content-Type: multipart/alternative; boundary=001a11c255504ad9fe0508038a92 Cc: python-list@python.org 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: 107 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416186190 news.xs4all.nl 2876 [2001:888:2000:d::a6]:47007 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 7138 X-Received-Body-CRC: 1434411736 Xref: csiph.com comp.lang.python:80937 --001a11c255504ad9fe0508038a92 Content-Type: text/plain; charset=UTF-8 Thanks for your kind reply. Yes, it seemed it worked with an older version than 3.x I got the following output: Process finished with exit code 0 So, what is the purpose of open() here? Thanks. On Mon, Nov 17, 2014 at 12:31 AM, Terry Reedy wrote: > 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 > > -- > https://mail.python.org/mailman/listinfo/python-list > --001a11c255504ad9fe0508038a92 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks for your kind reply. Yes, it seemed = it worked with an older version than 3.x

I got the following o= utput:

Process finished with exit code 0

So, what= is the purpose of open() here?

Thanks.

On Mon, Nov 17, 2014 at 12:31 AM, T= erry Reedy <tjreedy@udel.edu> wrote:
On 11/16/2014 2:37 PM, Abdul Abdul wrote:
Hello,

I'm trying to open an image using the `Python Imaging Library` as follo= ws:

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>
=C2=A0 =C2=A0 =C2=A0from PIL import Image
=C2=A0 =C2=A0File "C:\Python34\lib\site-packages\PIL\Image.py&q= uot;, line 62, in <module>

Answer is on line above.=C2=A0 Good for you for posting traceback.

=C2=A0 =C2=A0 =C2=A0from 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.=C2=A0 Get pillow instead.

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

--001a11c255504ad9fe0508038a92--