Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80931

Re: Error when trying to open an image

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 <python-python-list@m.gmane.org>
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 <tjreedy@udel.edu>
Subject Re: Error when trying to open an image
Date Sun, 16 Nov 2014 18:31:24 -0500
References <CAA+hu4V7V8hW7L79L97Ty6aGbQtb7NEF_iOmLY4CxDzw5suEjA@mail.gmail.com>
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 <CAA+hu4V7V8hW7L79L97Ty6aGbQtb7NEF_iOmLY4CxDzw5suEjA@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.15923.1416180714.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


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
> <module>
>      from PIL import Image
>    File "C:\Python34\lib\site-packages\PIL\Image.py", line 62, in <module>

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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Error when trying to open an image Terry Reedy <tjreedy@udel.edu> - 2014-11-16 18:31 -0500

csiph-web