This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author PeterL
Recipients PeterL
Date 2010-05-30.18:54:11
SpamBayes Score 6.479734e-07
Marked as misclassified No
Message-id <1275245654.33.0.885682282706.issue8859@psf.upfronthosting.co.za>
In-reply-to
Content
When the variable label is equal to '\xc5\xa0 Z\nX W'
this line sequence
label = " ".join(label.split())
label = unicode(label)
results in:
7347: ERROR: gramps.py: line 138: Unhandled exception
Traceback (most recent call last):
  File "C:\Program Files (x86)\gramps\gui\views\listview.py", line 660, in row_changed
    self.uistate.modify_statusbar(self.dbstate)
  File "C:\Program Files (x86)\gramps\DisplayState.py", line 521, in modify_statusbar
    name, obj = navigation_label(dbstate.db, nav_type, active_handle)
  File "C:\Program Files (x86)\gramps\Utils.py", line 1358, in navigation_label
    label = unicode(label)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: invalid data

While this line sequence:
label = unicode(label)
label = " ".join(label.split())
gives correct result and no error.

With the error the variable label changes from
'\xc5\xa0 Z\nX W'
to
'\xc5 Z X W'
by the line:
label = " ".join(label.split())
Note '\xa0' has been dropped, interpreted as "whitespace"?
This happens on Windows. It works perfectly well on Linux.
History
Date User Action Args
2010-05-30 18:54:14PeterLsetrecipients: + PeterL
2010-05-30 18:54:14PeterLsetmessageid: <1275245654.33.0.885682282706.issue8859@psf.upfronthosting.co.za>
2010-05-30 18:54:12PeterLlinkissue8859 messages
2010-05-30 18:54:11PeterLcreate