Zach Hirsch <zhir...@umich.edu> added the comment:

I'm not sure if this is the same problem, but it seems related.  I can
get the same ImportError without involving py2exe or modulefinder:

Python 2.5.4 (r254:67916, Feb 18 2009, 03:00:47) 
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import email.message
>>> sys.modules = sys.modules.copy()
>>> msg = email.message.Message()
>>> msg['From'] = 'f...@bar.com'
>>> msg.as_string()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/email/message.py", line 128, in as_string
    from email.Generator import Generator
  File "/usr/lib/python2.5/email/__init__.py", line 80, in __getattr__
    mod = sys.modules[self.__name__]
KeyError: 'email.generator'

If the "sys.modules = sys.modules.copy()" line is left out, everything
works as expected.

----------
nosy: +zhirsch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue2622>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to