Re: ImportError in Unpickle

2006-02-27 Thread [EMAIL PROTECTED]

It is indeed the problem. Thanks.

May be, this fact could have been mentioned in the documentation. I
have suggested the change using bug tracker.

Raghu.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ImportError in Unpickle

2006-02-26 Thread Rene Pijlman
[EMAIL PROTECTED]:
I have a python script that pickles and unpickles a give object. It
works without any problems on windows (the data was pickled on windows
first). But when I try to run the script on Linux, I get the following
error:
[...]
ImportError: No module named __main__

There are some posts in the Usenet archive that suggest you need to open
the pickled file in binary mode.
http://groups.google.nl/group/comp.lang.python/browse_frm/thread/2da0dcfc0a414251/0885a7a5723f3b03

-- 
René Pijlman
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ImportError in Unpickle

2006-02-26 Thread Rene Pijlman
Rene Pijlman:
[EMAIL PROTECTED]:
ImportError: No module named __main__

There are some posts in the Usenet archive

Also:
http://mail.python.org/pipermail/python-list/1999-April/000916.html

-- 
René Pijlman
-- 
http://mail.python.org/mailman/listinfo/python-list


ImportError in Unpickle

2006-02-25 Thread [EMAIL PROTECTED]
Hi,

I have a python script that pickles and unpickles a give object. It
works without any problems on windows (the data was pickled on windows
first). But when I try to run the script on Linux, I get the following
error:

mydbinfo = pickle.Unpickler(f).load()
  File /usr/lib/python2.3/pickle.py, line 872, in load
dispatch[key](self)
  File /usr/lib/python2.3/pickle.py, line 1083, in load_inst
klass = self.find_class(module, name)
  File /usr/lib/python2.3/pickle.py, line 1138, in find_class
__import__(module)
ImportError: No module named __main__

Even running the script with cygwin's python results in same error. It
looks me to be some problem with path setting for finding modules. Can
someone shed more light?

Thanks in advance,
Raghu.

-- 
http://mail.python.org/mailman/listinfo/python-list