Hello, I’m having a weird problem with matplotlib not finding fonts when being used from a py2exe packed program. The weird thing is that the program works fine on some computers, gives an annoying warning in others (but otherwise keeps working and plots things ok) or gives an error (and no plot is produced) in others.
A strange thing I noticed is that I’m using python 2.5 and one of the warnings is referring to python 2.6, so somehow it must be confusing itself with a python version installed in that computer.
Can somebody help?
Thanks,
Armando.
Warning it gives on some computers:
C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242: UserWarning: findfont: Font family [‘STIXGeneral’] not found. Falling back to Bitstream Vera Sans
C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1252: UserWarning: findfont: Could not match :family=Bitstream Vera Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. Returning C:\Windows\Fonts\cour.ttf
C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242: UserWarning: findfont: Font family [‘STIXNonUnicode’] not found. Falling back to Bitstream Vera Sans
C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1252: UserWarning: findfont: Could not match :family=Bitstream Vera Sans:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0. Returning C:\Windows\Fonts\cour.ttf
C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242: UserWarning: findfont: Font family [‘STIXSizeThreeSym’] not found. Falling back to Bitstream Vera Sans
C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242: UserWarning: findfont: Font family [‘STIXSizeFourSym’] not found. Falling back to Bitstream Vera Sans
C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242: UserWarning: findfont: Font family [‘STIXSizeFiveSym’] not found. Falling back to Bitstream Vera Sans
C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242: UserWarning: findfont: Font family [‘STIXSizeOneSym’] not found. Falling back to Bitstream Vera Sans
C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242: UserWarning: findfont: Font family [‘STIXSizeTwoSym’] not found. Falling back to Bitstream Vera Sans
C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1252: UserWarning: findfont: Could not match :family=Bitstream Vera Sans:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0. Returning C:\Windows\Fonts\cour.ttf
C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242: UserWarning: findfont: Font family [‘cmb10’] not found. Falling back to Bitstream Vera Sans
C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242: UserWarning: findfont: Font family [‘cmtt10’] not found. Falling back to Bitstream Vera Sans
C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242: UserWarning: findfont: Font family [‘cmmi10’] not found. Falling back to Bitstream Vera Sans
C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242: UserWarning: findfont: Font family [‘cmex10’] not found. Falling back to Bitstream Vera Sans
C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242: UserWarning: findfont: Font family [‘cmsy10’] not found. Falling back to Bitstream Vera Sans
C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242: UserWarning: findfont: Font family [‘cmr10’] not found. Falling back to Bitstream Vera Sans
C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242: UserWarning: findfont: Font family [‘cmss10’] not found. Falling back to Bitstream Vera Sans
Error it gives in another computer:
Traceback (most recent call last):
File “gui.pyw”, line 489, in parejas_fN
File “postproceso.pyo”, line 714, in init
File “matplotlib\backends\backend_wxagg.pyo”, line 59, in draw
File “matplotlib\backends\backend_agg.pyo”, line 394, in draw
File “matplotlib\artist.pyo”, line 55, in draw_wrapper
File “matplotlib\figure.pyo”, line 798, in draw
File “matplotlib\artist.pyo”, line 55, in draw_wrapper
File “matplotlib\axes.pyo”, line 1934, in draw
File “matplotlib\artist.pyo”, line 55, in draw_wrapper
File “matplotlib\axis.pyo”, line 1017, in draw
File “matplotlib\artist.pyo”, line 55, in draw_wrapper
File “matplotlib\axis.pyo”, line 234, in draw
File “matplotlib\artist.pyo”, line 55, in draw_wrapper
File “matplotlib\text.pyo”, line 524, in draw
File “matplotlib\text.pyo”, line 298, in _get_layout
File “matplotlib\backends\backend_agg.pyo”, line 180, in get_text_width_height_descent
File “matplotlib\backends\backend_agg.pyo”, line 221, in _get_agg_font
RuntimeError: Could not open facefile C:\Python26\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf; Cannot_Open_Resource