centos – Python, how to handle the ValueError: unsupported pickle protocol: 4 error?

centos – Python, how to handle the ValueError: unsupported pickle protocol: 4 error?

The Pickle protocol is basically the file format. From the documentation,
The higher the protocol used, the more recent the version of Python needed to read the pickle produced.Pickle protocol version 4 was added in Python 3.4, your python version (2.7.5) does not support this.

Either upgrade to Python 3.4 or later (current is 3.5) or create the pickle using a lower protocol (2) in the third parameter to pickle.dump().

This sometimes happens due to incorrect data in the redis database. Try it:

sudo redis-cli flushall

centos – Python, how to handle the ValueError: unsupported pickle protocol: 4 error?

Its a python version issue, upgrade it to the latest python version and try.

Leave a Reply

Your email address will not be published. Required fields are marked *