How to fix those errors?

Abdul Abdul abdul.sw84 at
Sun Nov 16 22:32:26 CET 2014


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:
            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?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list