Help with EOFError when loading .pyc files
Carl Bevil
carl_bevil at yahoo.com
Thu Feb 27 16:57:13 EST 2003
I am having a strange problem. At runtime, I can load a .py file and compile
it on the fly without trouble. But if there is a .pyc file already present
(generated from from the same .py file), when it is loaded and excuted, I get
a runtime error: "EOFError: EOF read where object expected".
I've seen this error message in marshal.c, and attempted to do some debugging.
But trying to figure out what is going wrong when executing a .pyc file is
not easy. :-)
So I'm hoping someone out there can give me some hints or advice on what is
going wrong.
Something that might be relevant is that I am cross-compiling my application
for a different platform. The interpreter is embedded into my application.
My application is built on the Windows platform, and the .py files are created
and saved on the Windows machine. I then run the application remotely (on a
proprietary platform), which reads in the .py/.pyc files, either from the PC's
hard drive (over the network), or directly from a CD. The reason I bring this
point up is that I am concerned this might be some sort of CRLF issue between
the two platforms. Although I would think if that were the case, the .py
files would not work either.
Any ideas?
Thanks!
Carl
More information about the Python-list
mailing list