tubearchivist / tubearchivist

Your self hosted YouTube media server

Home Page:https://www.tubearchivist.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]:downloads not moved to archive

dgunner-glitch opened this issue · comments

I've read the documentation

Operating System

Docker

Your Bug Report

After a download has completed the file move fails with an error "Invalid parameter".

If I go into the container I can create files in the destination and have some previous files there - it just seemed to stop downloading. I've checked the docker mounts and they are correct and I can see files from within the container.

From what I can tell the destination folder isn't created which is why the argument is invalid - but I can't see why the folder isn't created

Download a video

Video file should be moved to the destination folder.

Relevant log output

[2024-02-20 03:21:34,333: WARNING/ForkPoolWorker-1] NX8fDRYF_oo: Downloading video
[2024-02-20 03:22:41,408: WARNING/ForkPoolWorker-1] NX8fDRYF_oo: get metadata from youtube
[2024-02-20 03:22:44,120: WARNING/ForkPoolWorker-1] UC67SMH0qLMJ4b4Guud0mKjw: get metadata from es
[2024-02-20 03:23:02,202: WARNING/ForkPoolWorker-1] e7ca3e6f-f238-4c76-a159-783c67749d90 Failed callback
[2024-02-20 03:23:02,205: ERROR/ForkPoolWorker-1] Task download_pending[e7ca3e6f-f238-4c76-a159-783c67749d90] raised unexpected: OSError(22, 'Invalid argument')
Traceback (most recent call last):
  File "/root/.local/lib/python3.11/site-packages/celery/app/trace.py", line 477, in trace_task
    R = retval = fun(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/celery/app/trace.py", line 760, in __protected_call__
    return self.run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/home/tasks.py", line 208, in download_pending
    videos_downloaded = downloader.run_queue(auto_only=auto_only)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/home/src/download/yt_dlp_handler.py", line 191, in run_queue
    self.move_to_archive(vid_dict)
  File "/app/home/src/download/yt_dlp_handler.py", line 390, in move_to_archive
    os.chown(new_path, host_uid, host_gid)
OSError: [Errno 22] Invalid argument: '/youtube/UC67SMH0qLMJ4b4Guud0mKjw/NX8fDRYF_oo.mp4'
[2024-02-20 03:23:02,206: WARNING/ForkPoolWorker-1] e7ca3e6f-f238-4c76-a159-783c67749d90 return callback

Anything else?

No response

Is this on a NFS mount? You might have to remove the HOST_UID and HOST_GID variables as described here: https://docs.tubearchivist.com/installation/docker-compose/#overview

Also make sure you have enough space there.

assume this has been solved by now.