RuntimeError: _image_module::readpng could not open PNG file

Hi all, How can I resolve this problem

    > "/usr/lib/python2.4/site-packages/matplotlib/",
    > line 309, in get_rgba X = readpng(pngfile) RuntimeError:
    > _image_module::readpng could not open PNG file
    > /home/nwagner/.matplotlib/tex.cache/7215ee9c7d9dc229d2921a40e899ec5f_80.png

My guess is that this is a gtk threading problem. I've seen similar
problems with recent gtk releases. The problem is that the texmanager
issues os.popen and returns before the command is finished. We need
a GUI dependent safe way to run system commands that blocks execution
until the system command returns.

See my August thread to the pygtk mailing list

David Aitel points to a recipe in his book

But this hasn't been implemented yet. Try flushing your tex cache and
rerunning under tkagg which will fix the problem, I suspect.

Basically we need a backend run_system command for each backend.