[New-bugs-announce] [issue5509] cPickle - module object has no attribute

Nathaniel Troutman report at bugs.python.org
Wed Mar 18 18:08:13 CET 2009

New submission from Nathaniel Troutman <locutusofbeira at yahoo.com>:

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 'Foo'"

Attached are:
Foo.py which defines the class Foo and pickles out a list of objects

LoadFoo.py attempts to load the list of objects pickled by Foo

I'm running Vista with "Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08)
[MSC v.1310 32 bit (Intel)] on win32"

components: None
files: Foo.py
messages: 83759
nosy: ntroutman
severity: normal
status: open
title: cPickle - module object has no attribute
versions: Python 2.5
Added file: http://bugs.python.org/file13364/Foo.py

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list