python2.7 一个莫名其妙的错误
Posted darkchii
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python2.7 一个莫名其妙的错误相关的知识,希望对你有一定的参考价值。
Traceback (most recent call last): File "/home/darkchii/文档/PycharmProjects/ml/model.py", line 3, in <module> import matplotlib.pyplot as plt File "/home/darkchii/.local/lib/python2.7/site-packages/matplotlib/pyplot.py", line 71, in <module> from matplotlib.backends import pylab_setup File "/home/darkchii/.local/lib/python2.7/site-packages/matplotlib/backends/__init__.py", line 16, in <module> line for line in traceback.format_stack() File "/home/darkchii/.local/lib/python2.7/site-packages/matplotlib/backends/__init__.py", line 18, in <genexpr> if not line.startswith(‘ File "<frozen importlib._bootstrap‘)) UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0xe6 in position 23: ordinal not in range(128)
说是无法解码18行,23列位置上的‘字节’,我也是醉了,关键第23列是这样的:
图中的startswith的sw的s。。。这叫我怎么改。。。