[IPython-User] AttributeError: 'FakeModule' object has no attribute

Alan alanwilter@gmail....
Thu Jul 15 11:09:03 CDT 2010

Hi there,

This problem has been with me since I discovered iPython years ago and after
googling and googling I still haven't found any solution.

I am trying to load a pickle file that works fine in anything except in

I do:

from acpype import *

import pickle

o = pickle.load(open('AAA.pkl','rb'))

acpype contains the class ACTopol needed.

So in ipython I got:

In [6]: o = pickle.load(open('AAA.pkl','rb'))
AttributeError                            Traceback (most recent call last)

/Users/alan/workspace/acpype/mess/AAA.acpype/<ipython console> in <module>()

/sw/lib/python2.7/pickle.pyc in load(file)
   1377 def load(file):
-> 1378     return Unpickler(file).load()
   1380 def loads(str):

/sw/lib/python2.7/pickle.pyc in load(self)
    856             while 1:
    857                 key = read(1)
--> 858                 dispatch[key](self)
    859         except _Stop, stopinst:
    860             return stopinst.value

/sw/lib/python2.7/pickle.pyc in load_global(self)
   1088         module = self.readline()[:-1]
   1089         name = self.readline()[:-1]
-> 1090         klass = self.find_class(module, name)
   1091         self.append(klass)
   1092     dispatch[GLOBAL] = load_global

/sw/lib/python2.7/pickle.pyc in find_class(self, module, name)
   1124         __import__(module)
   1125         mod = sys.modules[module]
-> 1126         klass = getattr(mod, name)
   1127         return klass

AttributeError: 'FakeModule' object has no attribute 'ACTopol'

Any idea? Many thanks in advance,


Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20100715/28a823bb/attachment.html 

More information about the IPython-User mailing list