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.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to