On 2021-08-26 11:09:21 +0400, Abdur-Rahmaan Janhangeer wrote:
> Cannot read one file in a zip file if the zip file contains multiple files.
> This example does not work https://www.py4u.net/discuss/203494
> shows a ValueError: Multiple files found in ZIP file. Only one file per ZIP.
> If the Zip file has one file, fine else i cannot find a way. Thanks
Is it possible that you are trying to treat the zip file as a gzip file?
Those are different file formats with different purposes (archive vs.
stream), but they use the same compression algorithm, and the gzip tool
(and - I presume - also the gzip library) can read a zip file with a
single member. The error message would match that.
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | h...@hjp.at
| -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/