In article <rowen-bce283.11090408102...@news.gmane.org>, "Russell E. Owen" <ro...@uw.edu> wrote:
> I have a Mac python application I bundle with py2app. It has > successfully included matplotlib for several years. However recently I > added strip charts to it and now I find that the Mac bundle is broken: > when I run on a system that does not have matplotlib installed it dies > with a traceback...(could not find font file in /Library/Frameworks/Python...) I found the problem, though not a robust solution. The problem is that matplotlib is using the font cache in ~/.matplotlib. Sometimes this gets out of date and then font files cannot be found. Unfortunately matplotlib does not realize the data is bogus and so crashes instead of rebuilding the cache files. I have gotten two user reports of this problem. It also invalidates what I thought was a pretty solid test of whether my application is properly self-contained: move the Python, Tcl and Tk frameworks out of the way and then run my bundle. I have to also delete the matplotlib caches and then remember to delete them again after the test. It would be really, really nice to have a standard way of forcing matplotlib to ignore cache files (neither read nor write them). An adequate but less thorough solution is for matplotlib to test the font cache when it first loads it (e.g. by trying to find a font) and rebuild it if it doesn't work. -- Russell _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG