Lattyware / unrpa

A program to extract files from the RPA archive format.
http://www.lattyware.co.uk/projects/unrpa/
GNU General Public License v3.0
590 stars 74 forks source link

Unsupported pickle protocol error with Python 3.7 #42

Open Bioruebe opened 1 year ago

Bioruebe commented 1 year ago

Problem

Newer archives (Ren'Py 8) fail to extract when using Python 3.7, because the built-in pickle library does not support the pickle 5 format.

Unrpa crashes with the message

File "unrpa\__main__.py", line 196, in <module>
  File "unrpa\__main__.py", line 189, in main
  File "unrpa\__init__.py", line 123, in extract_files
  File "unrpa\__init__.py", line 217, in get_index
ValueError: unsupported pickle protocol: 5

Solution

There are two options to address this issue: either require Python 3.8.3+ or - for better compatibility - use the pickle5 library to make the newer format available on older versions of python. (Preferably as a dynamic import, so python 3.8 and newer don't require an additional dependency.)