unzipping file results in “BadZipFile: File is not a zip file”

前端 未结 7 505
甜味超标
甜味超标 2020-12-16 09:13

I have two zip files, both of them open well with Windows Explorer and 7-zip.

However when i open them with Python\'s zipfile module [ zipfile.ZipFile(\"filex.zip\"

7条回答
  •  孤街浪徒
    2020-12-16 09:47

    I run into the same issue. My problem was that it was a gzip instead of a zip file. I switched to the class gzip.GzipFile and it worked like a charm.

提交回复
热议问题