plt.close(fig) error in python 3.2

Sorry for reporting this here, it's the only way for matplotlib I'm
signed up for.

I'm testing scikits statsmodels on Python 3.2

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

  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

https://github.com/statsmodels/statsmodels/issues/152
https://github.com/statsmodels/statsmodels/blob/master/scikits/statsmodels/graphics/tests/test_boxplots.py#L15

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

Since I'm not familiar with the matplotlib details, I don't know what
this means.

Josef

Could you double-check exactly which version you have? In the master branch, we made a change on Nov 14th to not delete dictionary items while iterating. I suspect Gohlke’s build was from before then.

Ben Root

···

On Wed, Feb 29, 2012 at 7:32 AM, <josef.pktd@…1896…> wrote:

Sorry for reporting this here, it’s the only way for matplotlib I’m

signed up for.

I’m testing scikits statsmodels on Python 3.2

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

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

https://github.com/statsmodels/statsmodels/issues/152

https://github.com/statsmodels/statsmodels/blob/master/scikits/statsmodels/graphics/tests/test_boxplots.py#L15

replacing plt.close(fig) with plt.close(‘all’) removes the test errors

in python 3.2

Since I’m not familiar with the matplotlib details, I don’t know what

this means.

Josef

Sorry for reporting this here, it's the only way for matplotlib I'm
signed up for.

I'm testing scikits statsmodels on Python 3.2

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

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

https://github.com/statsmodels/statsmodels/issues/152

https://github.com/statsmodels/statsmodels/blob/master/scikits/statsmodels/graphics/tests/test_boxplots.py#L15

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

Since I'm not familiar with the matplotlib details, I don't know what
this means.

Josef

Could you double-check exactly which version you have? In the master
branch, we made a change on Nov 14th to not delete dictionary items while
iterating. I suspect Gohlke's build was from before then.

I'm not able to tell the exact version

import matplotlib
matplotlib.__version__

'1.2.x'

but the creation date of the files that have been installed in site-packages is
Wednesday, ‎November ‎09, ‎2011, ‏‎5:09:50 AM

so before Nov 14th

I'm not able to build matplotlib myself.

Thanks,

Josef

···

On Wed, Feb 29, 2012 at 1:46 PM, Benjamin Root <ben.root@...1304...> wrote:

On Wed, Feb 29, 2012 at 7:32 AM, <josef.pktd@...287...> wrote:

Ben Root

<snip>

I'm not able to build matplotlib myself.

If you're interested, I've been able to build on windows since
Christophe provides the dependencies by doing the following

http://old.nabble.com/Building-on-Windows-(Was-Re%3A-Calling-all-Mac-OSX-users!)-td32283791.html

I have detailed instructions written down somewhere...

Skipper

···

On Wed, Feb 29, 2012 at 2:02 PM, <josef.pktd@...287...> wrote:

<snip>

I'm not able to build matplotlib myself.

If you're interested, I've been able to build on windows since
Christophe provides the dependencies by doing the following

http://old.nabble.com/Building-on-Windows-(Was-Re%3A-Calling-all-Mac-OSX-users!)-td32283791.html

I have detailed instructions written down somewhere...

I'd rather postpone (indefinitely?) the pleasure of building 64bit
binaries on Windows. Especially for python 3.2, the main point is to
test with publicly available binaries.

Thanks,

Josef

···

On Wed, Feb 29, 2012 at 2:09 PM, Skipper Seabold <jsseabold@...287...> wrote:

On Wed, Feb 29, 2012 at 2:02 PM, <josef.pktd@...287...> wrote:

Skipper

That build is from November 9, 2011, git ref 75c9beccc7 <https://github.com/matplotlib/matplotlib/tree/75c9beccc73ef7c8b686aec58610a3da225816ee> plus some additional minor changes (indentation and urllib) I was working on at that time.

It should be easy to just patch the installed version in order to fix this specific issue without recompiling matplotlib <https://github.com/matplotlib/matplotlib/commit/f3c8caed654c311f20952ad1cf3a96e1b0293664>

Christoph

···

On 2/29/2012 10:46 AM, Benjamin Root wrote:

On Wed, Feb 29, 2012 at 7:32 AM, <josef.pktd@…287… > <mailto:josef.pktd@…287…>> wrote:

    Sorry for reporting this here, it's the only way for matplotlib I'm
    signed up for.

    I'm testing scikits statsmodels on Python 3.2

    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

      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

    https://github.com/statsmodels/statsmodels/issues/152
    https://github.com/statsmodels/statsmodels/blob/master/scikits/statsmodels/graphics/tests/test_boxplots.py#L15

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

    Since I'm not familiar with the matplotlib details, I don't know what
    this means.

    Josef

Could you double-check exactly which version you have? In the master
branch, we made a change on Nov 14th to not delete dictionary items
while iterating. I suspect Gohlke's build was from before then.

Ben Root

Updated installers for Python 3.x are at <http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib>. Git ref d661a4871c.

Christoph

···

On 2/29/2012 11:19 AM, josef.pktd@...287... wrote:

On Wed, Feb 29, 2012 at 2:09 PM, Skipper Seabold<jsseabold@...287...> wrote:

On Wed, Feb 29, 2012 at 2:02 PM,<josef.pktd@...287...> wrote:
<snip>

I'm not able to build matplotlib myself.

If you're interested, I've been able to build on windows since
Christophe provides the dependencies by doing the following

http://old.nabble.com/Building-on-Windows-(Was-Re%3A-Calling-all-Mac-OSX-users!)-td32283791.html

I have detailed instructions written down somewhere...

I'd rather postpone (indefinitely?) the pleasure of building 64bit
binaries on Windows. Especially for python 3.2, the main point is to
test with publicly available binaries.

Thanks,

Josef

Skipper