What is "marshal data"?

Michael Hudson mwh at python.net
Thu Nov 15 14:24:28 EST 2001


Cliff Wells <logiplexsoftware at earthlink.net> writes:

> On Thursday 15 November 2001 10:28, Soren Ragsdale wrote:
> 
> > Possible sources of the problem: "uh.py" is imported from MANY
> > programs on our network.  It's being imported by Linux and Irix
> > machines running 1.5.2 and 2.1.1 versions of Python.  Could this be
> 
> As mentioned in another thread, the bytecode between python versions is not 
> backward compatible, so you may be trying to execute 2.1.1 bytecode on a 
> 1.5.2 interpreter and that may be causing the problem.

Shouldn't be.  The first four bytes of a .pyc file are a
version-specific magic number, meant to stop this happening.

Executing the wrong bytecode would cause SystemErrors or core dumps,
not ValueErrors complaining about marshal data -- the marshal module
does little checking of its input, as it's only there to speed things
up...

Cheers,
M.

-- 
  First of all, email me your AOL password as a security measure. You
  may find that won't be able to connect to the 'net for a while. This
  is normal. The next thing to do is turn your computer upside down
  and shake it to reboot it.                     -- Darren Tucker, asr



More information about the Python-list mailing list