Skip to content

Commit 38ac463

Browse files
authored
Change misleading zip64 limit error message
This error message is confusing as it seems to indicate that the file is already using zip64. This new message makes it more clear what the problem is, and will help guide developers to find the solution. (That is, to use in `ZipFile.open(force_zip64=True`))
1 parent 1b46d11 commit 38ac463

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/zipfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,10 +1206,10 @@ def close(self):
12061206
if not self._zip64:
12071207
if self._file_size > ZIP64_LIMIT:
12081208
raise RuntimeError(
1209-
'File size unexpectedly exceeded ZIP64 limit')
1209+
'File size too large, try using force_zip64')
12101210
if self._compress_size > ZIP64_LIMIT:
12111211
raise RuntimeError(
1212-
'Compressed size unexpectedly exceeded ZIP64 limit')
1212+
'Compressed size too large, try using force_zip64')
12131213
# Seek backwards and write file header (which will now include
12141214
# correct CRC and file sizes)
12151215

0 commit comments

Comments
 (0)