#31418 closed Bug (invalid)
ValueError when FileBasedCache is used in Python 3.7 — at Version 4
Reported by: | mastizada | Owned by: | nobody |
---|---|---|---|
Component: | Core (Cache system) | Version: | 2.2 |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Using FileBasedCache in Django 2.2.12 with Python 3.7.3 is giving ValueError: unsupported pickle protocol: 5
Checking the highest protocol version for pickle using pickle.HIGHEST_PROTOCOL
is giving 4, so the protocol 5 is not available.
Line that is causing the error: filebased.py
in _is_expired
at line 146, exp = pickle.load(f)
.
Using Python 3.8.0 solves the problem.
Change History (4)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Django 1.11 was the last version of Django to support Python 2.7
comment:3 by , 5 years ago
You likely serialized data using Python 3 and are trying to deserialize it using Python 2. Django 2.2 also doesn't support Python 2 at all.
comment:4 by , 5 years ago
Description: | modified (diff) |
---|---|
Summary: | ValueError when FileBasedCache is used in Python 2.7 → ValueError when FileBasedCache is used in Python 3.7 |
Indicated the wrong python version
Django 2.2 doesn't support Python2.7