gallery-dl icon indicating copy to clipboard operation
gallery-dl copied to clipboard

NotADirectoryError:

Open Littlemac123 opened this issue 1 year ago • 1 comments

im on linuxmint 20.1 using python3 with a pip install

little_mac@android-2e3bb540fc264640:~/.local/bin$ /home/little_mac/.local/bin/gallery-dl https://www.pixiv.net/en/users/44247466

[download][warning] NotADirectoryError: [Errno 20] Not a directory: './gallery-dl/pixiv/44247466 utiyamakazuto/99442816_p0.jpg.part' [download][error] Failed to download 99442816_p0.jpg

[download][warning] NotADirectoryError: [Errno 20] Not a directory: './gallery-dl/pixiv/44247466 utiyamakazuto/99442816_p1.jpg.part' [download][error] Failed to download 99442816_p1.jpg ^C KeyboardInterrupt

Littlemac123 avatar Aug 08 '22 07:08 Littlemac123

Are you sure your gallery-dl is the latest version? You can run gallery-dl --version to confirm.

kattjevfel avatar Aug 08 '22 11:08 kattjevfel

yes it says

python3 /home/little_mac/.local/bin/gallery-dl --version 1.22.4

Littlemac123 avatar Aug 10 '22 16:08 Littlemac123

What are your pixiv config settings, especially directory and filename?

According to the error message, it tries to call mkdir for ./gallery-dl/pixiv/44247466 utiyamakazuto/99442816_p1.jpg.part, but that doesn't make any sense and I can't think of a way to accomplish that.

mikf avatar Aug 10 '22 19:08 mikf

okay it worked after i got the linux build gallery-dl.bin in teh release page. only the python3 pip install dose this

Littlemac123 avatar Aug 10 '22 19:08 Littlemac123

So I did find a way to reproduce this error, and it is like I initially thought: Some node along the target path is not a directory, so gallery-dl can't create the necessary directories and move the file there:

# create empty file
touch /tmp/danbooru

# attempt to download
gallery-dl https://danbooru.donmai.us/posts/5583242
[download][warning] NotADirectoryError: [Errno 20] Not a directory: '/tmp/danbooru/danbooru_5583242_875835a3fe42066970ad642f8005e3a0.jpg.part'
[download][error] Failed to download danbooru_5583242_875835a3fe42066970ad642f8005e3a0.jpg

Move/delete whatever file there is along ./gallery-dl/pixiv/44247466 utiyamakazuto and the error is gone.

mikf avatar Aug 12 '22 12:08 mikf