Hi Martin,

Thanks for the reply. Yes - I was using Pyinstaller version 1.5.1.

Looking at pyi_rth_mpldata.py:
import sys,os
targetdir = os.environ.get("_MEIPASS2", os.path.abspath(os.path.dirname(sys.argv[0])))
os.environ["MATPLOTLIBDATA"] = os.path.join(targetdir, "mpl-data")
I inserted a few print statements so I could see what targetdir it was coming up with etc (and verifying that the hook was running at all).
import sys,os
targetdir = os.environ.get("_MEIPASS2", os.path.abspath(os.path.dirname(sys.argv[0])))
print "targetdir: %s" % targetdir
print "targetdir exists?: %s" % os.path.exists(targetdir)
mpldir = os.path.join(targetdir, "mpl-data")
print "mpldir exists?: %s" % os.path.exists(mpldir)
print "mpldir is a directory?: %s" % os.path.isdir(mpldir)
os.environ["MATPLOTLIBDATA"] = mpldir
The exact temp file changes each time but here is an example of the output:
targetdir: C:/DOCUME~1/grant/LOCALS~1/Temp/_MEI38802/
targetdir exists?: True
mpldir exists?: False
mpldir is a directory?: False
Is the mpl-data directory made later? I don't think it is made at all and that seems to be where things are falling over.


All the best, Grant


On 09/12/11 11:59, Martin Zibricky wrote:
Grant Paton-Simpson píše v Pá 09. 12. 2011 v 11:38 +1300:
Does anyone have any ideas? I have tried to strip everything down to
the
simplest level possible.
Are you trying 1.5.1 version?

there are two options:
  - try svn version (the .spec needs to be recreated)
  - look at file ./support/rthooks/pyi_rth_mpldata.py where
MATPLOTLIBDATA is set at runtime.




--
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.

Reply via email to