2👍
✅
Opening the file without the binary flag b
was ok in Python 2 where binary and string were the same datatype, but Python 3 is more strict about it. So if you do open(file, 'rb')
the system won’t try to interpret the zip file as text.
Source:stackexchange.com