You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
On attempting to run the subpar like python3 foo.par you will get an obscure error:
can't find '__main__' module in /foo.par
If you do python3 -vv foo.par you will see a logline:
# zipimport: found 0 names in /abs/path/to/foo.par
Python's zipimport._read_directory has failed to find any files because it has incorrectly calculated the byte offset for the first ZIP record file. It has incorrectly calculated the byte offset because it does not understand ZIP64.
So if you see this error check the size of your .par.
This is very unlikely to be fixed due to Subpar's maintenance status but it's good to document it here to potentially save others some debugging time.
Any
.par
written by Subpar usingzipfile
will be ZIP64 format whenever the file size exceedsZIP64_LIMIT = (1 << 31) - 1
. See https://github.com/python/cpython/blob/ffd87b7093109c279caf8e3ca060f408a102388a/Lib/zipfile.py#L56As of Python 3.10
zipimport
does not support ZIP64. The module function in question is_read_directory
: https://github.com/python/cpython/blob/bb3e0c240bc60fe08d332ff5955d54197f79751c/Lib/zipimport.py#L408-L468On attempting to run the subpar like
python3 foo.par
you will get an obscure error:If you do
python3 -vv foo.par
you will see a logline:Python's
zipimport._read_directory
has failed to find any files because it has incorrectly calculated the byte offset for the first ZIP record file. It has incorrectly calculated the byte offset because it does not understand ZIP64.So if you see this error check the size of your
.par
.cc @ducthienbui97 who completed this bug investigation.
The text was updated successfully, but these errors were encountered: