UnicodeError messages lack information about the problem input string

Bug #896374 reported by Martin Packman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

Currently bug reports about unicode problems require psychic debugging skills, because the Python error message is formatted as:

    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128)

The exception instance does have an 'object' attribute that stores the initial string, but only a single character is mentioned in the standard formatting. For issues such as bug 876511, having the content of the line that failed would greatly help working out which of several possible inputs was to blame.

Some care would need to be taken to avoid knock on problems with huge strings or badly constructed exceptions, but users may be more able to resolve certain issues such as bad locale settings if the basic output had more context.

Martin Packman (gz)
Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.