[Python-modules-team] Bug#796889: python-xlib: UnicodeDecodeError on instantiating Xlib.xauth.Xauthority
Mel Collins
mel at raumkraut.net
Tue Aug 25 13:31:10 UTC 2015
Package: python-xlib
Version: 0.14+20091101-4
Severity: grave
Justification: renders package unusable
Dear Maintainer,
After upgrading python-xlib (or python3-xlib) to 0.14+20091101-3 (or -4),
attempting to instantiate an Xauthority instance (eg. via attempting to get a
Display()) fails with a UnicodeDecodeError:
$ python
Python 2.7.10 (default, Jul 1 2015, 10:54:53)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Xlib import xauth
>>> xauth.Xauthority()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/Xlib/xauth.py", line 84, in __init__
self.entries.append((family, addr.decode('UTF-8'),
File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xac in position 0: invalid
start byte
Following the logic of Xauthority.__init__ indicates my ~/.Xauthority file has:
>>> raw[4:8] # first addr
'\xac\x11\x11\x89'
Downgrading to 0.14+20091101-1 from Jessie fixes the issue:
$ python
Python 2.7.10 (default, Jul 1 2015, 10:54:53)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Xlib import xauth
>>> xauth.Xauthority()
<Xlib.xauth.Xauthority instance at 0x7fd2656ec8c0>
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (900, 'testing'), (500, 'testing-updates'), (500, 'unstable'),
(1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 4.1.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages python-xlib depends on:
pn python:any <none>
python-xlib recommends no packages.
python-xlib suggests no packages.
-- no debconf information
More information about the Python-modules-team
mailing list