2

From the python shell under open suse

Python 2.7.5 (default, May 30 2013, 16:55:57) [GCC] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import matplotlib.pyplot as plt

returns the following. Any help appreciated.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/matplotlib/pyplot.py", line 24, in <module>
    import matplotlib.colorbar
  File "/usr/lib64/python2.7/site-packages/matplotlib/colorbar.py", line 29, in <module>
    import matplotlib.collections as collections
  File "/usr/lib64/python2.7/site-packages/matplotlib/collections.py", line 23, in <module>
    import matplotlib.backend_bases as backend_bases
  File "/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.py", line 50, in <module>
    import matplotlib.textpath as textpath
  File "/usr/lib64/python2.7/site-packages/matplotlib/textpath.py", line 11, in <module>
    import matplotlib.font_manager as font_manager
  File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 1356, in <module>
    _rebuild()
  File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 1341, in _rebuild
    fontManager = FontManager()
  File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 1004, in __init__
    self.ttflist = createFontList(self.ttffiles)
  File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 584, in createFontList
    prop = ttfFontProperty(font)
  File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 398, in ttfFontProperty
    sfnt4 = sfnt4.decode('ascii').lower()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xaa in position 7: ordinal not in range(128) 

1 Answer 1

0

check to see if your working directory path has non-ascii character, if so changing your working directory to a path name of all-ascii character.
refer to This question and answer for further information.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.