catch UnicodeDecodeError
jaroslav.dobrek at gmail.com
jaroslav.dobrek at gmail.com
Thu Jul 26 07:58:03 EDT 2012
More information about the Python-list mailing list
Thu Jul 26 07:58:03 EDT 2012
- Previous message (by thread): catch UnicodeDecodeError
- Next message (by thread): catch UnicodeDecodeError
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> that tells you the exact code line where the error occurred. No need to
> look around.
You are right:
try:
for line in f:
do_something()
except UnicodeDecodeError:
do_something_different()
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.
- Previous message (by thread): catch UnicodeDecodeError
- Next message (by thread): catch UnicodeDecodeError
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list