8000 Merge pull request #11957 from tacaswell/fix_unicode_traceback · matplotlib/matplotlib@3156af0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3156af0

Browse files
authored
Merge pull request #11957 from tacaswell/fix_unicode_traceback
FIX: fix importing backend with non-ascii characters
2 parents 5e64f9e + 69b4233 commit 3156af0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/backends/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
_log = logging.getLogger(__name__)
1313

1414
backend = matplotlib.get_backend()
15-
_backend_loading_tb = "".join(
15+
# the `str` calls here are to make non-ascii paths work on python2
16+
_backend_loading_tb = str("").join(
1617
line for line in traceback.format_stack()
1718
# Filter out line noise from importlib line.
18-
if not line.startswith(' File "<frozen importlib._bootstrap'))
19+
if not line.startswith(str(' File "<frozen importlib._bootstrap')))
1920

2021

2122
def pylab_setup(name=None):

0 commit comments

Comments
 (0)
0