Hi All, I am working on a platform that makes it difficult to provide repro cases... but I am hoping someone can shed some light on what I am seeing... Essentially, I have a program imports another script that* import matplotlib.pyplot as PLT... when it runs more than once then I get the following traceback:
Error in atexit._run_exitfuncs: Traceback (most recent call last): File "C:\Python27\lib\atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "C:\Python27\lib\site-packages\matplotlib\_pylab_helpers.py", line 87, in destroy_all for manager in list(Gcf.figs.values()): AttributeError: 'NoneType' object has no attribute 'figs' Error in sys.exitfunc: Traceback (most recent call last): File "C:\Python27\lib\atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "C:\Python27\lib\site-packages\matplotlib\_pylab_helpers.py", line 87, in destroy_all for manager in list(Gcf.figs.values()): AttributeError: 'NoneType' object has no attribute 'figs' This occurs because in this case the PLT functionality is NOT being used on the main script. If I edit the _pylab_helpers.py file and check to see if Gcf is None... if it is NOT then do the "destroy_all" logic... else it passes [code change below]... then the error disappears. I can make it disappear for many cases by creating a "dummy" figure so that Gcf gets created and therefore has some garbage to collect. Any information you can give me would be greatly appreciated. TY, MJ [cid:image001.png@01CFE248.0F0A2700]
_pylab_helpers.py
Description: _pylab_helpers.py
------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users