Repository navigation
font_manager.py UnicodeDecodeError when starting ipython --pylab - #2307
Conversation
|
Seems this can be fixed by changing line 398 from however I'm not sure if this results in any side effects. |
|
@cycomanic: Can you confirm this patch resolves your issue? This may also fix #2320. |
|
Thanks -- it was helpful to know the problematic font. It contains a non-ascii character as its name -- according to this (http://www.freetype.org/freetype2/docs/reference/ft2-truetype_tables.html#TT_MAC_ID_XXX), that entry is supposed to be "macroman" and not "ascii", so I've updated matplotlib to reflect that. |
|
I will try later tonight. Cheers On 27/08/13 04:26, Michael Droettboom wrote:
|
|
👍 Tried it, works! (See #2320 (comment)) |
font_manager.py UnicodeDecodeError when starting ipython --pylab
|
I am having the same issue where my software package employs matplotlib1.3.0. We are almost about to release and I was hoping that you could confirm that in fact, the ONLY change needed to fix this issue is the movement of 'ascii' to 'macroman' in those two locations in font_manager.py. BTW, we have a ton of harness tests across a myriad of languages and this solution had worked for us in regards to fixing the traceback. I am just being extra cautious. Thanks for the heads up ahead of time. MJ |
I'm experiencing a UnicodeDecodeError when starting ipython --pylab.
System: Debian Sid
$apt-cache policy python-matplotlib
python-matplotlib:
Installed: 1.3.0-1
This seems to be caused by on of the font name containing non-ascii characters. The font causing the issues seems to be " Systematic TT BRK" from the ttf-aenigma package in debian sid. Error message below:
/usr/lib/pymodules/python2.7/matplotlib/font_manager.py in ttfFontProperty(font)
396 sfnt2 = ''
397 if sfnt4:
--> 398 sfnt4 = sfnt4.decode('ascii').lower()
399 else:
400 sfnt4 = ''
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc6 in position 0: ordinal
not in range(128)