Python 解压此文件时,它会给我以下错误:错误的zip文件不是zip文件

Python 解压此文件时,它会给我以下错误:错误的zip文件不是zip文件,python,unzip,Python,Unzip,我想解压缩zip文件。文件名为test.zip.001。 我正在尝试解压缩此文件,但它给了我以下错误: 错误的ZipFile:文件不是zip文件 这是我的代码: from zipfile import ZipFile file_name="test.zip.004" with ZipFile(file_name,'r') as zip: zip.extractall() print("Done") 你的代码对我来说很好。您确定test.zip.004实际上是一个有效的zip文件

我想解压缩zip文件。文件名为
test.zip.001
。 我正在尝试解压缩此文件,但它给了我以下错误:

错误的ZipFile:文件不是zip文件

这是我的代码:

from zipfile import ZipFile
file_name="test.zip.004"
with ZipFile(file_name,'r') as zip:
    zip.extractall()
    print("Done")

你的代码对我来说很好。您确定
test.zip.004
实际上是一个有效的zip文件吗

如果您正在Linux上运行,或者可以访问命令行
unzip
命令,请尝试测试该文件是否有效

# Check that it is valid
$ unzip -t test.zip.004
Archive:  test.zip.004
    testing: abc                      OK
No errors detected in compressed data of test.zip.004.

# Corrupt the zip file
$ echo xxx >test.zip.004

# unzip spots the corruption
$ unzip -t test.zip.004
Archive:  test.zip.004
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of test.zip.004 or
        test.zip.004.zip, and cannot find test.zip.004.ZIP, period.

我正在使用window进行糖尿病视网膜病变检测。kaggle中的数据集avialable的格式是test.zip.001,现在我不知道它是否是zip文件?该文件是否可以在web上的某个地方访问?这是我的代码,数据链接是:我在kaggle链接中看到它说的“由于此数据集的大小非常大,我们已将文件分为多部分存档。我们建议您使用7zip或keka来解压缩“。您需要将test.zip文件的7个部分组合在一起,然后才能阅读它。请尝试7zip。先生,您是否有使用7zip在google colab中解压缩此文件的代码