From 7869d7ef661cab771f52f522421c38b2bb3372bb Mon Sep 17 00:00:00 2001 From: dmjohnsson23 Date: Mon, 28 Nov 2022 15:28:19 -0700 Subject: [PATCH] Change confusing error message This error message can mistakenly confuse people into thinking that the zip file is already using zip64, when in fact the problem is that they are not using zip64. --- Lib/zipfile/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/zipfile/__init__.py b/Lib/zipfile/__init__.py index 8f834267b28c2e..e1833dd1772d56 100644 --- a/Lib/zipfile/__init__.py +++ b/Lib/zipfile/__init__.py @@ -1202,10 +1202,10 @@ def close(self): if not self._zip64: if self._file_size > ZIP64_LIMIT: raise RuntimeError( - 'File size unexpectedly exceeded ZIP64 limit') + 'File size too large, try using force_zip64') if self._compress_size > ZIP64_LIMIT: raise RuntimeError( - 'Compressed size unexpectedly exceeded ZIP64 limit') + 'Compressed size too large, try using force_zip64') # Seek backwards and write file header (which will now include # correct CRC and file sizes)