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


Groups > comp.lang.python > #80906

How to fix those errors?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.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 <abdul.sw84@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.057
X-Spam-Evidence '*H*': 0.89; '*S*': 0.00; 'pil': 0.09; 'try:': 0.09; 'subject:How': 0.10; 'errors:': 0.16; 'filelist': 0.16; 'ioerror:': 0.16; 'subject:those': 0.16; 'thanks.': 0.20; 'seems': 0.21; 'example': 0.22; 'import': 0.22; 'print': 0.22; 'statement': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'getting': 0.31; 'except': 0.35; 'convert': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'expected': 0.38; 'follows:': 0.38; 'to:addr:python-list': 0.38; 'skip:& 20': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'skip:\xc2 10': 0.60; 'solve': 0.60; 'skip:o 30': 0.61; '8bit%:100': 0.72; '--->': 0.84; 'walking': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=/3MIi8T38YU5j0hwTWfW9sPRFGLPOiVoHHKSuEpxePo=; b=WoXpP43VXESedTRN1AToXzzaO2n481fV7ilEn5R0GjHEEYfXYTITTFFo8EOT+rLEnc +R1sJD8PYfJauwoWU3f75iNJOKWCIQqsUP3D+VGFTnGtCbtD6OPAnO3QxswhZMMlBhG3 gOL4gmDUb/PNNhdwMOGa2ZhVb/cGiTf2xBW7pvwguvu3bsZbMvSDFuoLBIagXzZR3HOb r1JjcRvMnOtdRJAZDpGJe71QtYCLJVP3CLLZpMuQEHQJfn7rtuUMqX+5YnuYynL55ykv xOA9lWRi6r+phUyZnLFru6Ag/cJUv4VqA0cL7iCGdyhqGBfANlsRMJd4IK/GOSBfk/DS 5qtQ==
MIME-Version 1.0
X-Received by 10.182.241.195 with SMTP id wk3mr20712254obc.33.1416173546937; Sun, 16 Nov 2014 13:32:26 -0800 (PST)
Date Sun, 16 Nov 2014 22:32:26 +0100
Subject How to fix those errors?
From Abdul Abdul <abdul.sw84@gmail.com>
To python-list@python.org
Content-Type multipart/alternative; boundary=089e01634b7e34a1c005080099ce
X-Mailman-Approved-At Sun, 16 Nov 2014 22:34:50 +0100
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.15903.1416173691.18130.python-list@python.org> (permalink)
Lines 51
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1416173691 news.xs4all.nl 2927 [2001:888:2000:d::a6]:37582
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:80906

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Hello,

I'm walking through an example that goes as follows:

from PIL import Image
import os

    for inputfile in filelist
    outputfile = os.path.splitext(inputfile)[0]+".jpg"
    if inputfile != outputfile:
        try:
            Image.open(inputfile).save(outputfile)
            except IOError:
            print "unable to convert ", inputfile

I'm writing that in "Pycharm", and getting the following errors:

* filelist ---> Unresolved reference 'filelist'

* IOError: Statement seems to have no effect

* The last 'filelist' ---> 'except' or 'finally' expected

How can I solve those errors?

Thanks.

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


Thread

How to fix those errors? Abdul Abdul <abdul.sw84@gmail.com> - 2014-11-16 22:32 +0100
  Re: How to fix those errors? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-11-16 23:04 +0100
    Re: How to fix those errors? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-11-16 23:13 +0100
      Re: How to fix those errors? Chris Angelico <rosuav@gmail.com> - 2014-11-17 09:22 +1100
        Re: How to fix those errors? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-17 11:38 +1100
          Re: How to fix those errors? Chris Angelico <rosuav@gmail.com> - 2014-11-17 12:05 +1100
          Re: How to fix those errors? Roy Smith <roy@panix.com> - 2014-11-16 21:55 -0500
            Re: How to fix those errors? Chris Angelico <rosuav@gmail.com> - 2014-11-17 14:06 +1100
              Re: How to fix those errors? alex23 <wuwei23@gmail.com> - 2014-11-19 13:02 +1000
                Re: How to fix those errors? Chris Angelico <rosuav@gmail.com> - 2014-11-19 14:40 +1100
                Re: How to fix those errors? alex23 <wuwei23@gmail.com> - 2014-11-21 20:21 +1000
            Re: How to fix those errors? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-11-18 20:25 +1300
              Re: How to fix those errors? Chris Angelico <rosuav@gmail.com> - 2014-11-18 18:37 +1100
              Re: How to fix those errors? wxjmfauth@gmail.com - 2014-11-19 08:00 -0800
            Re: How to fix those errors? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-19 09:33 +1100

csiph-web