473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

pickle: No module named on. HELP!

What seems to be the matter?

path = "C:\\eclipse\\workspace\\moin134\\docbook\\xslt\\h tml\\db_compiled.dat" f = file(path)
cPickle.load(f) Traceback (most recent call last):
File "<interactive input>", line 1, in ?
ImportError: No module named on. f = file(path)
pickle.load(f)

Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "C:\Python24\lib\pickle.py", line 1390, in load
return Unpickler(file).load()
File "C:\Python24\lib\pickle.py", line 872, in load
dispatch[key](self)
File "C:\Python24\lib\pickle.py", line 1083, in load_inst
klass = self.find_class(module, name)
File "C:\Python24\lib\pickle.py", line 1138, in find_class
__import__(module)
ImportError: No module named on.

Thanks,

Henry
Jul 18 '05 #1
1 3559
fanbanlo wrote:
What seems to be the matter?

>>> path = "C:\\eclipse\\workspace\\moin134\\docbook\\xslt\\h tml\\db_compiled.dat" >>> f = file(path)
>>> cPickle.load(f) Traceback (most recent call last):
File "<interactive input>", line 1, in ?
ImportError: No module named on. >>> f = file(path)
>>> pickle.load(f)

Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "C:\Python24\lib\pickle.py", line 1390, in load
return Unpickler(file).load()
File "C:\Python24\lib\pickle.py", line 872, in load
dispatch[key](self)
File "C:\Python24\lib\pickle.py", line 1083, in load_inst
klass = self.find_class(module, name)
File "C:\Python24\lib\pickle.py", line 1138, in find_class
__import__(module)
ImportError: No module named on.

Thanks,

Henry


Got it, forgot to open file in binary mode. Thx
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bram Stolk | last post by:
Hello, I am using python-2.2.2 on linux-ARM. Python itself works OK. However, importing pickle gives me *very* strange results: The first 'import pickle' fails with "ImportError: No module...
10
by: Justin Straube | last post by:
Hello, Im trying to compile a script with py2exe. The pickle module is causing the program to give an error. Traceback (most recent call last): File "SETIstat.pyw", line 330, in ? File...
28
by: Grant Edwards | last post by:
I finally figured out why one of my apps sometimes fails under Win32 when it always works fine under Linux: Under Win32, the pickle module only works with a subset of floating point values. In...
0
by: Mike P. | last post by:
Hi all, I'm working on a simulation (can be considered a game) in Python where I want to be able to dump the simulation state to a file and be able to load it up later. I have used the standard...
3
by: Guy Lateur | last post by:
Hi all, I've been writing an application containing a lot of settings which can be changed by the user. I'm using wx.Config to read/write these settings (to the windows registry). This means I...
10
by: crystalattice | last post by:
I'm creating an RPG for experience and practice. I've finished a character creation module and I'm trying to figure out how to get the file I/O to work. I've read through the python newsgroup...
3
by: Jeffrey Barish | last post by:
I have a class derived from string that is used in a pickle. In the new version of my program, I moved the module containing the definition of the class. Now the unpickle fails because it doesn't...
3
by: fizilla | last post by:
Hello all! I have the following weird problem and since I am new to Python I somehow cannot figure out an elegant solution. The problem reduces to the following question: How to pickle a...
10
by: est | last post by:
>>import md5 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python25\lib\pickle.py", line 1366, in dumps Pickler(file, protocol).dump(obj) File...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.