-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test.py: error&&KeyError: "There is no item named 'imgHQ06409.png' in the archive" #22
Comments
lantingyue11
changed the title
hello
test.py: error&&KeyError: "There is no item named 'imgHQ06409.png' in the archive"
Oct 8, 2020
That is because the zip file is not correct. You have to use python to rezip what you need.
|
谢谢😜
…---Original---
From: ***@***.***>
Date: Fri, Apr 16, 2021 19:25 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [researchmm/PEN-Net-for-Inpainting] test.py: error&&KeyError: "There is no item named 'imgHQ06409.png' in the archive" (#22)
That is because the zip file is not correct. You have to use python to rezip what you need.
import zipfile # 导入模块 # BASE_STATIC_CASE_RESULT:我Django static下面的某个路径 base_dir = os.path.join('G:/obm_project', 'trainA') # 要压缩文件夹的根路径 zip_file_name = 'trainA.zip' f = zipfile.ZipFile(os.path.join('G:/obm_project', zip_file_name), 'w', zipfile.ZIP_DEFLATED) for dir_path, dir_name, file_names in os.walk(base_dir): # 要是不replace,就从根目录开始复制 file_path = dir_path.replace(base_dir, '') # 实现当前文件夹以及包含的所有文件 file_path = file_path and file_path + os.sep or '' for file_name in file_names: f.write(os.path.join(dir_path, file_name), file_path + file_name) f.close()
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
你解决问题了吗请问。我还是不知道怎么训练自己的数据集 |
请问这个问题您解决了吗? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
test.py: error: the following arguments are required: -l/--level
can you tell me the question?
And how deal with dataset in datazip?
The text was updated successfully, but these errors were encountered: