ValueError: bad marshal data

Very strange error happened today – I was running a few python scripts I was writing when I suddenly started getting a “ValueError: bad marshal data” error .

ValueError: bad marshal data

It was due to libxml2 but I didn’t know why. I deleted the “C:\Python24\Lib\site-packages\libxml2.pyc” and the “C:\Python24\Lib\site-packages\libxml2.pyo” file which solved the problem. No idea why as the error message means nothing to me.

One Comment

  1. Posted August 6, 2010 at 3:43 am | Permalink

    This happens due to the faulty compile caching of python.

    Try this to rid yourself of this problem:

    find / -iname \*.pyc -exec rm {} \;

    Or optionally disable compile caching. If I could figure out how, I’d do that instead. Right now I rely on the command above to clear out the annoyance.

Post a Comment

Your email is never published nor shared. Required fields are marked *