Erik Tollerud added the comment:
The package that triggers it for me is the py (http://pypi.python.org/pypi/py)
package - when in gets imported, it does some trick with sys.modules that is in
place to get around some pickling restriction, but that means sys.modules is
altered during the
New submission from Erik Tollerud :
The inspect.getmodule function crashes if packages are installed that futz with
sys.modules while they are being tested for module status or the like. I'm not
actually sure which packages are doing this, but the symptom is the for loop
over sys.mo