ValueError: pickle protocol 4 asked for; the highest available protocol is 2
See original GitHub issueObserved behavior
While testing https://github.com/learningequality/kolibri/pull/6207 got error related pickle protocols
Expected behavior
no errors
User-facing consequences
unknown
Errors and logs
ERROR Job 767a126271ec48daabf6d5ff1d1f3129 raised an exception: Traceback (most recent call last):
File "/Users/d/.pex/install/kolibri-0.13.0b4.dev0+git.7.g1e965215-py2.py3-none-any.whl.1c96f71514c7e69b0d22c18963272db7a4f3d938/kolibri-0.13.0b4.dev0+git.7.g1e965215-py2.py3-none-any.whl/kolibri/core/tasks/worker.py", line 69, in handle_finished_future
result = future.result()
File "/Users/d/.pex/install/kolibri-0.13.0b4.dev0+git.7.g1e965215-py2.py3-none-any.whl.1c96f71514c7e69b0d22c18963272db7a4f3d938/kolibri-0.13.0b4.dev0+git.7.g1e965215-py2.py3-none-any.whl/kolibri/dist/py2only/concurrent/futures/_base.py", line 422, in result
return self.__get_result()
File "/Users/d/.pex/install/kolibri-0.13.0b4.dev0+git.7.g1e965215-py2.py3-none-any.whl.1c96f71514c7e69b0d22c18963272db7a4f3d938/kolibri-0.13.0b4.dev0+git.7.g1e965215-py2.py3-none-any.whl/kolibri/dist/py2only/concurrent/futures/thread.py", line 62, in run
result = self.fn(*self.args, **self.kwargs)
File "/Users/d/.pex/install/kolibri-0.13.0b4.dev0+git.7.g1e965215-py2.py3-none-any.whl.1c96f71514c7e69b0d22c18963272db7a4f3d938/kolibri-0.13.0b4.dev0+git.7.g1e965215-py2.py3-none-any.whl/kolibri/core/tasks/worker.py", line 222, in wrap
raise e
ValueError: pickle protocol 4 asked for; the highest available protocol is 2
Steps to reproduce
ran pex start
command
Context
pex from https://github.com/learningequality/kolibri/pull/6207 on macOS
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
ValueError: pickle protocol 4 asked for; the highest available ...
Are you using the same cache across Python 2 and Python 3? If so you need to set the pickle level to 2...
Read more >ValueError: unsupported pickle protocol: 4 with pandas
It looks like this pickle file has been created like as follows: pickle.dump(df, file_name, protocol=4). or pickle.dump(df, file_name, ...
Read more >pickle — Python object serialization — Python 3.11.1 ...
Source code: Lib/pickle.py The pickle module implements binary protocols for serializing and de-serializing a Python object structure.
Read more >My Web2Py site works finally but I get all kinds of errors when I ...
ValueError '> unsupported pickle protocol: 3 Version web2py™ Version 2.18.5-stable+timestamp.2019.04.08.04.22.03 Python Python 2.7.12: ...
Read more >pickle.dump protocol level - Google Groups
pickle.dump protocol level. 813 views ... ValueError'> unsupported pickle protocol: 3 ... either you run python 3 or you run python 2.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The only reason that it should be asking for a higher pickle version than is available is if there are different Python versions at play - also @micahscopes I assume no one running the pex is using redis, so I feel like it’s not the redis version that is the issue.
Seems more likely to be pickling that’s happening either in
diskcache
or in SQLAlchemy (for async tasks). The latter seems the most likely, if a task runner running Python2 is still running in the background, but a Python3 server queues something up in the task queue with its pickle protocol.closing in favor of these three issues: