catch UnicodeDecodeError

jaroslav.dobrek at jaroslav.dobrek at
Thu Jul 26 13:58:03 CEST 2012

> that tells you the exact code line where the error occurred. No need to
> look around.

You are right:

    for line in f:
except UnicodeDecodeError:

does exactly what one would expect it to do. 

Thank you very much for pointing this out and sorry for all the posts. This is one of the days when nothing seems to work and when I don't seem to able to read the simplest error message. 

More information about the Python-list mailing list