Yeah, you can use python -B to suppress .pyc/.pyo creation on import. We ran into a similar situation, except it was two different versions of Python modifying the same set of .pyc files.

-Nathan

-----Original Message----- From: max
Sent: Tuesday, October 18, 2011 10:52 PM
To: Nuke Python discussion
Subject: Re: [Nuke-python] ValueError: bad marshal data

Sorry, just saw this, annoying one that took me quite a while to figure
out...

it's caused by multiple machines (most likely on the farm) trying to
access the same python code at the same time. What might happen is that
2 machines try to write the pyc files for the python script at the same
time. This will cause 2 or 3 different errors randomly, one of them the
'bad marshall' one.

We solved it by removing write access for the farm to the code area on
our server.

Supposedly there's also a flag in Python2.6 onwards to suppress the
creation/use of pyc files, but I haven't tested it.

Cheers,
Max


On 06/16/2011 08:07 PM, Gerard Keating wrote:
Hi,
Has anyone ever seen this error when importing modules:
ValueError: bad marshal data
Anyone know how to avoid it? It seems to happen rarely but randomly.
Regards,
Gerard Keating.
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

--
This message was scanned by Fuel's spambox and is believed to be clean.

_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to