Jeeaaasus / youtube-dl

Automated yt-dlp Docker image
https://hub.docker.com/r/jeeaaasustest/youtube-dl/
MIT License
258 stars 33 forks source link

PermissionError: [Errno 13] Permission denied: '/root/yt-dlp-plugins' #82

Closed Xalaxis closed 1 year ago

Xalaxis commented 1 year ago

I'm not sure when this started happening, but at some point between the container working fine yesterday I started getting the following error on start-up and every cycle.

  File "/usr/local/bin/yt-dlp", line 5, in <module>
    from yt_dlp import main
  File "/usr/local/lib/python3.9/dist-packages/yt_dlp/__init__.py", line 19, in <module>
    from .downloader.external import get_external_downloader
  File "/usr/local/lib/python3.9/dist-packages/yt_dlp/downloader/__init__.py", line 26, in <module>
    from .external import FFmpegFD, get_external_downloader
  File "/usr/local/lib/python3.9/dist-packages/yt_dlp/downloader/external.py", line 12, in <module>
    from ..postprocessor.ffmpeg import EXT_TO_OUT_FORMATS, FFmpegPostProcessor
  File "/usr/local/lib/python3.9/dist-packages/yt_dlp/postprocessor/__init__.py", line 38, in <module>
    _PLUGIN_CLASSES = load_plugins('postprocessor', 'PP')
  File "/usr/local/lib/python3.9/dist-packages/yt_dlp/plugins.py", line 136, in load_plugins
    for finder, module_name, _ in iter_modules(name):
  File "/usr/local/lib/python3.9/dist-packages/yt_dlp/plugins.py", line 120, in iter_modules
    pkg = importlib.import_module(fullname)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 982, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 925, in _find_spec
  File "/usr/local/lib/python3.9/dist-packages/yt_dlp/plugins.py", line 97, in find_spec
    search_locations = self.search_locations(fullname)
  File "/usr/local/lib/python3.9/dist-packages/yt_dlp/plugins.py", line 72, in search_locations
    candidate_locations.extend(_get_package_paths(
  File "/usr/local/lib/python3.9/dist-packages/yt_dlp/plugins.py", line 62, in _get_package_paths
    if not plugin_dir.is_dir():
  File "/usr/lib/python3.9/pathlib.py", line 1422, in is_dir
    return S_ISDIR(self.stat().st_mode)
  File "/usr/lib/python3.9/pathlib.py", line 1221, in stat
    return self._accessor.stat(self)
PermissionError: [Errno 13] Permission denied: '/root/yt-dlp-plugins'
Xalaxis commented 1 year ago

I'm using the UID 99 and the GID 100 if that's important. I had a look inside the container filesystem and there doesn't appear to be anything in /root/ at all. Perhaps using the modified UID/GID values yt-dlp doesn't have permission to check/create the plugin binaries?

Jeeaaasus commented 1 year ago

This is because of the latest release. I have the same error.

Jeeaaasus commented 1 year ago

Should be fixed now :)

Xalaxis commented 1 year ago

I can confirm that fixed the issue, thanks!