Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't import pylab after1.4.x update: TypeError: cannot return std::string from Unicode object #4046

Closed
alumbreras opened this issue Jan 28, 2015 · 1 comment

Comments

@alumbreras
Copy link

After updating my python packages with conda, I can't import pylab:

(OS: Windows 7 Enterprise)

Python 2.7.5 |Anaconda 2.1.0 (64-bit)| (default, Jul 1 2013, 12:37:52) [MSC v.1
500 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 2.2.0 -- An enhanced Interactive Python.

from matplotlib import pylab


TypeError Traceback (most recent call last)
in ()
---> 1 from matplotlib import pylab

C:\Anaconda\lib\site-packages\matplotlib\textpath.py in ()
17 from matplotlib.path import Path
18 from matplotlib import rcParams
---> 19 import matplotlib.font_manager as font_manager
20 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, LOAD_NO_HINTING

[...more traces...]

C:\Anaconda\lib\site-packages\matplotlib\font_manager.py in _rebuild()
1395 def _rebuild():
1396 global fontManager
-> 1397 fontManager = FontManager()
1398 if _fmcache:
1399 pickle_dump(fontManager, _fmcache)

C:\Anaconda\lib\site-packages\matplotlib\font_manager.py in init(self, size,
weight)
1050 self.defaultFont['ttf'] = self.ttffiles[0]
1051
-> 1052 self.ttflist = createFontList(self.ttffiles)
1053
1054 self.afmfiles = findSystemFonts(paths, fontext='afm') + \

C:\Anaconda\lib\site-packages\matplotlib\font_manager.py in createFontList(fontf
iles, fontext)
577 else:
578 try:
--> 579 font = ft2font.FT2Font(fpath)
580 except RuntimeError:
581 verbose.report("Could not open font file %s"%fpath)

TypeError: cannot return std::string from Unicode object

@alumbreras
Copy link
Author

Uninstalled and installed Anacoda (probably with some packages less than before) and it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant