Exception RuntimeError: 'sys.meta_path must be a list of import hooks

Neal Becker wrote:

Any ideas what this is about?

No traceback, just this message:

Exception RuntimeError: 'sys.meta_path must be a list of import hooks' in
<bound method plot.__del__ of <__main__.plot object at 0x2cf5c10>> ignored

Maybe I found it. I had an object managing my plot, which had a __del__ which
called pdf.close(). Probably this destructor was called too late. I now
explicitly call del on my object, and the problem is gone.