Hi all,

I've wrote a small script that collects some data and uses Matplotlib to 
plot it to a pdf file.

If I just run the script it works fine, however, if I run the binary 
compiled by PyInstaller it fails with:

Traceback (most recent call last):
  File "<string>", line 273, in <module>
  File "<string>", line 255, in main
  File "<string>", line 242, in monitor_mx
  File "<string>", line 172, in write_pdf
  File "/data/apps/tmp/build/check_mx3/out00-PYZ.pyz/matplotlib.pyplot", 
line 576, in savefig
  File "/data/apps/tmp/build/check_mx3/out00-PYZ.pyz/matplotlib.figure", 
line 1470, in savefig
  File 
"/data/apps/tmp/build/check_mx3/out00-PYZ.pyz/matplotlib.backend_bases", 
line 2139, in print_figure
  File 
"/data/apps/tmp/build/check_mx3/out00-PYZ.pyz/matplotlib.backends.backend_pdf", 
line 2475, in print_pdf
  File 
"/data/apps/tmp/build/check_mx3/out00-PYZ.pyz/matplotlib.backends.backend_pdf", 
line 525, in close
  File 
"/data/apps/tmp/build/check_mx3/out00-PYZ.pyz/matplotlib.backends.backend_pdf", 
line 628, in writeFonts
  File 
"/data/apps/tmp/build/check_mx3/out00-PYZ.pyz/matplotlib.backends.backend_pdf", 
line 1103, in embedTTF
  File 
"/data/apps/tmp/build/check_mx3/out00-PYZ.pyz/matplotlib.backends.backend_pdf", 
line 889, in embedTTFType3
TypeError: encode() argument 1 must be string, not None


It fails while trying to savefig:

plt.savefig(pp, format='pdf', bbox_inches='tight',dpi=100)

My PyInstaller spec file is:

# -*- mode: python -*-
a = Analysis(['check_mx3.py','config.py'],
            
 
pathex=['/data/apps/tmp','/data/apps/tmp/Python278/lib/python2.7/site-packages'],
             hiddenimports=[],
             hookspath=None,
             runtime_hooks=None)
pyz = PYZ(a.pure)
exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          name='check_mx3',
          debug=False,
          strip=None,
          upx=True,
          console=True )

Does anyone have any idea what may be happening?

Thanks in advance,
George

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.

Reply via email to