What version of matplotlib are you using?  Unfortunately, I think this 
is a known issue in 0.90.1 that manifests itself most severely on 
Windows.  If you still see it with 0.91.2, let us know and I'll probably 
want some more information from you.

Cheers,
Mike

Jack Sankey wrote:
> Hello,
> 
> I wrote a script that loops over some files, plotting them
> individually with imshow(). In between each file, the program waits
> for user input and then clears/closes the current figure before making
> a new one.
> 
> Roughly 5-10 files into the loop, the script dies, outputting a loop
> of stuff like this until I close the figure:
> 
> File "C:\Python25\Lib\site-packages\matplotlib\pyplot.py", line 201, in gcf
>   File "C:\Python25\Lib\site-packages\matplotlib\pyplot.py", line 187, in 
> figure
>   File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wxagg.py",
> line 120, in new_figure_manager
>   File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wx.py",
> line 1302, in __init__
>   File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wxagg.py",
> line 39, in _get_toolbar
>   File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wx.py",
> line 1593, in __init__
>   File "C:\Python25\Lib\site-packages\matplotlib\backend_bases.py",
> line 1391, in __init__
>   File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wx.py",
> line 1615, in _init_toolbar
>   File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wx.py",
> line 1452, in _load_bitmap
>   File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_gdi.py",
> line 530, in __init__
> PyAssertionError: C++ assertion "IsOpened()" failed at
> ..\..\src\common\ffile.cpp(187) in wxFFile::Seek(): can't seek on
> closed file
> 
> Alternatively, it occasionally will tell me there are too many files
> open. I have checked and all my file operations include a close(). Any
> thoughts? I am using wxpython and wxAgg as my backend, with pycrust
> (pyshell) on windows XP.
> 
> Thanks,
> Jack
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to