UnicodeDecodeError issue
Chris Angelico
rosuav at gmail.com
Sun Sep 1 06:51:10 EDT 2013
On Sun, Sep 1, 2013 at 8:35 PM, Dave Angel <davea at davea.name> wrote:
> Your file mode is 'w' which will wipe out anything written earlier. Yet
> if the exception does not happen, the file will still contain error(s)
> from some earlier run. You should open (and truncate) the file before
> the first use, then use the same handle in each exception at which you
> want to record any information.
Hmm, I'd go the other way, and append to the file every time there's
an error - otherwise, one successful page load will wipe out the error
from a previous one. But I agree that the inconsistency is not helping
him.
ChrisA
More information about the Python-list
mailing list