Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python 3.2 errors on plot close in tests #152

Closed
josef-pkt opened this issue Feb 29, 2012 · 3 comments
Closed

python 3.2 errors on plot close in tests #152

josef-pkt opened this issue Feb 29, 2012 · 3 comments

Comments

@josef-pkt
Copy link
Member

plt.close(fig) in the graphics tests raises an error, python 3.2, matplotlib 1.2.x from Gohlke for Win 64, nose 1.0.0

I don't know if this is a matplotlib bug or we need to change plot tests.

======================================================================
ERROR: Test violinplot and beanplot with the same dataset.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\programs\python32\lib\site-packages\nose-1.0.0-py3.2.egg\nose\case.py", line 188, in runTest
    self.test(*self.arg)
  File "C:\Programs\Python32\lib\site-packages\numpy\testing\decorators.py", line 147, in skipper_func
    return f(*args, **kwargs)
  File "C:\Programs\Python32\lib\site-packages\scikits.statsmodels-0.4.0-py3.2.egg\scikits\statsmodels\graphics\tests\test_boxplots.py", line 33, in test_violinplot_beanplot
    plt.close(fig)
  File "C:\Programs\Python32\lib\site-packages\matplotlib\pyplot.py", line 433, in close
    _pylab_helpers.Gcf.destroy_fig(arg)
  File "C:\Programs\Python32\lib\site-packages\matplotlib\_pylab_helpers.py", line 75, in destroy_fig
    for manager in Gcf.figs.values():
RuntimeError: dictionary changed size during iteration
@josef-pkt
Copy link
Member Author

I didn't get the error for the plots in test_var, which close plots with

def close_plots():
    try:
        import matplotlib.pyplot as plt
        plt.close('all')
    except ImportError:
        pass

@josef-pkt
Copy link
Member Author

replacing plt.close(fig) with plt.close('all') removes the test errors in python 3.2

@josef-pkt
Copy link
Member Author

bug was already fixed in matplotlib master for python 3

http://comments.gmane.org/gmane.comp.python.matplotlib.general/29946

could revert to plt.close(fig) with newer installer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant