savefig to pdf: 'str' object has no attribute 'decode' #6516
The following script:
works fine and shows the figure, but saving to pdf results in the following error:
The error arises only if cyrillic letters are used in labels.
changed the title
savefig tp pdf: 'str' object has no attribute 'decode'
May 31, 2016
I get different errors, but I assume I am missing the required russian specific tex packages.
Can you drop into the debugger and get what the font name is? It looks like this is a work-around to getting bytestrings that need to be decoded to
I've tried the same code under Python 2.7 and got another error:
larm1200 that's the font name
FWIW, I've got TeX Live 2015 on OS X 10.11. The font called larm1200 by TeX is supplied in the file sfrm1200.pfb.
@horribleheffalump: Do you have an entry for larm1200 in pdftex.map? Is there a corresponding pfa or pfb file?
The following script is giving me the same error:
Which produces the following error:
However, I am not using any special characters except [ '%', '$'], which I have escaped. The figure will show fine on the console. The error occurs when I attempt to save as a .pdf.
Matplotlib 1.5.1, Python 3.4, OS Windows 7