[issue5509] cPickle - module object has no attribute

2009-03-18 Thread Nathaniel Troutman
New submission from Nathaniel Troutman : If I define a class Foo in module A and in module A pickle out a list of Foo objects to 'foo.pkl', then in module B attempt to unpickle 'foo.pkl' I recieve the error "AttributeError: 'module' object has no attribute

[issue5509] cPickle - module object has no attribute

2009-03-18 Thread Nathaniel Troutman
Nathaniel Troutman added the comment: Why can I only attach one file at a time? -- Added file: http://bugs.python.org/file13365/LoadFoo.py ___ Python tracker <http://bugs.python.org/issue5

[issue5509] cPickle - module object has no attribute

2009-03-18 Thread Nathaniel Troutman
Nathaniel Troutman added the comment: I believe I've tracked down the problem. When you run a python module directly (ie "python Foo.py") any classes defined in the module have their '__module__' attribute set to '__main__'. Which means the pickle says the