Package: python-matplotlib Version: 2.2.3-6 Severity: normal Tags: upstream, fixed-upstream
Dear Maintainer, UnicodeDecodeError on importing pyplot If some module in call stack is located in directory with non-ascii character in path. The problem is that traceback.format_stack() returns list of 'str' objects in python2. This problem happens only on python2. Code for reproduction Create two modules in a directory with a non-ascii character in the path. #!/usr/bin/env python # first_module.py import second_module # second_module.py import matplotlib.pyplot Run first module. $ python2 first_module.py Following traceback happens Traceback (most recent call last): File "./a.py", line 3, in <module> import second_module File "/home/developer/WorkData/PLC/beremiz/tmp/xыв/beremiz/second_module.py", line 3, in <module> import matplotlib.pyplot File "/usr/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 71, in <module> from matplotlib.backends import pylab_setup File "/usr/lib/python2.7/dist-packages/matplotlib/backends/__init__.py", line 16, in <module> line for line in traceback.format_stack() File "/usr/lib/python2.7/dist-packages/matplotlib/backends/__init__.py", line 18, in <genexpr> if not line.startswith(' File "<frozen importlib._bootstrap')) UnicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position 50: ordinal not in range I've reported this bug upstream https://github.com/matplotlib/matplotlib/issues/11955 and it was fixed and release as part of 2.2.4 release https://github.com/matplotlib/matplotlib/commit/69b4233a7d8ef0750f83aa63ff20b939e996cc4f It makes python programs installed in user's directories with non-ascii symbols in path unusable. Would be nice to get this minor change backported to be included in Buster. -- System Information: Debian Release: buster/sid APT prefers testing-debug APT policy: (500, 'testing-debug'), (500, 'testing'), (50, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.19.0-1-rt-amd64 (SMP w/8 CPU cores; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages python-matplotlib depends on: ii libc6 2.28-7 ii libfreetype6 2.9.1-3 ii libgcc1 1:8.2.0-21 ii libjs-jquery 3.3.1~dfsg-1 ii libjs-jquery-ui 1.12.1+dfsg-5 ii libpng16-16 1.6.36-5 ii libstdc++6 8.2.0-21 ii python 2.7.15-4 ii python-backports.functools-lru-cache 1.5-2 ii python-cycler 0.10.0-1 ii python-dateutil 2.7.3-3 ii python-kiwisolver 1.0.1-2+b1 ii python-matplotlib2-data 2.2.3-6 ii python-numpy [python-numpy-abi9] 1:1.16.1-1 ii python-pyparsing 2.2.0+dfsg1-2 ii python-six 1.12.0-1 ii python-subprocess32 3.5.3-1 ii python-tz 2018.9-1 ii zlib1g 1:1.2.11.dfsg-1 Versions of packages python-matplotlib recommends: ii python-pil 5.4.1-1 ii python-tk 2.7.15-1+b1 Versions of packages python-matplotlib suggests: pn dvipng <none> ii ffmpeg 7:4.1.1-1 ii ghostscript 9.26a~dfsg-2 ii gir1.2-gtk-3.0 3.24.5-1 ii inkscape 0.92.4-2 pn ipython <none> ii librsvg2-common 2.44.10-1 pn python-cairocffi <none> pn python-configobj <none> pn python-excelerator <none> ii python-gi 3.30.4-1 ii python-gobject-2 2.28.6-13+b1 pn python-matplotlib2-doc <none> ii python-nose 1.3.7-4 ii python-qt4 4.12.1+dfsg-2+b1 pn python-scipy <none> ii python-sip 4.19.13+dfsg-2 pn python-tornado <none> pn python-traits <none> ii python-wxgtk3.0 3.0.2.0+dfsg-8 pn texlive-extra-utils <none> ii texlive-latex-extra 2018.20190131-1 pn ttf-staypuft <none> -- no debconf information