Skip to content
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

Creation of ZIP archive fails #968

Closed
arisboch opened this issue Aug 31, 2020 · 3 comments
Closed

Creation of ZIP archive fails #968

arisboch opened this issue Aug 31, 2020 · 3 comments
Labels

Comments

@arisboch
Copy link

arisboch commented Aug 31, 2020

When I try to use the zip.extension config option to choose a custom extension for the ZIP archive, it gives me the following error message:

[postprocessor][error] 'zip' initialization failed: FileNotFoundError: [Errno 2] No such file or directory: "./gallery-dl_ef070ab5-3ba0-4bad-9198-5d5a3ff959dd/nhentai/296632 [Ringoya (Alp)] Tsushima's Day Off _ Tsushima no Kyuujitsu (Love Live! Sunshine!!) [English] [Waconda G Squad + Marv] [2019-12-07].zip"

What am I doing wrong here?

Edit: Even when I removed the config entry it still won't produce the ZIP archive. Is the filename too long? If so, is it possible to (automatically) restrict the length of the filename?

@arisboch arisboch changed the title NHentai extractor doesn't accept the zip.extension config entry Creation of ZIP archive fails Aug 31, 2020
@mikf
Copy link
Owner

mikf commented Aug 31, 2020

This appears to be a bug present since commit 4d8b3e4.
It only manifests itself when the directory for the ZIP archive doesn't yet exist, which may be why nobody encountered/reported it until now.

As a workaround, you can manually create the directory in question beforehand
(./gallery-dl_ef070ab5-3ba0-4bad-9198-5d5a3ff959dd/nhentai/ in your case),
or you set mode to "safe".

@mikf mikf added the bug label Aug 31, 2020
@arisboch
Copy link
Author

Setting the zip mode to safe didn't help, either.

@arisboch
Copy link
Author

arisboch commented Sep 2, 2020

Creating the directory beforehand as a workaround (using my wrapper script) did help, but sometimes, when I e.g. try to use manga hosting sites such as Dynasty Reader or Mangadex, the ZIP file creation fails because the directory structure above the directory for the individual item to download is more complex than usual ("base directory/extarctor/manga title" instead of just "base directory/extarctor").

@mikf mikf closed this as completed in fd0685d Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants