close

[Solved] How to fix Python Value:bad marshal data?

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error How to fix Python Value:bad marshal data? in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How to fix Python Value:bad marshal data Error Occurs?

Today I get the following error How to fix Python Value:bad marshal data? in python.

How To Solve fix Python Value:bad marshal data Error ?

  1. How To Solve fix Python Value:bad marshal data Error ?

    To Solve fix Python Value:bad marshal data Error If you don't recreate the .pyc file, your program starts slower than necessary as the .py file takes longer to load than the .pyc (and a normal user cannot write the .pyc file).

  2. How to fix Python Value:bad marshal data?

    To Solve fix Python Value:bad marshal data Error If you don't recreate the .pyc file, your program starts slower than necessary as the .py file takes longer to load than the .pyc (and a normal user cannot write the .pyc file).

Solution 1

If you get that error, the compiled version of the Python module (the .pyc file) is corrupt probably. Gentoo Linux provides python-updater, but in Debian the easier way to fix: just delete the .pyc file. If you don’t know the pyc, just delete all of them (as root):

find /usr -name '*.pyc' -delete

Solution 2

Just delete

/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/properties.pyc

it is corrupt as the text indicates. You’ll probably have to do so as root.

After that start (again as root) run python (2.7):

/usr/bin/python -c "import sqlalchemy.orm.properties"

to recreate this .pyc file.

If you don’t recreate the .pyc file, your program starts slower than necessary as the .py file takes longer to load than the .pyc (and a normal user cannot write the .pyc file).

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read