Samik081 / beets-beatport4

Beatport API v4 compatible beets plugin
MIT License
26 stars 2 forks source link

[Errno 13] Permission denied: '/lsiopy/lib/python3.12/site-packages/beetsplug/__init__.py' #15

Open MCMXD opened 2 months ago

MCMXD commented 2 months ago

Config: Beets in Docker container via docker compose on Ubuntu

Unlike all my other plugins beets-beatport4 requires root inside my beets container to install And any server restart requires me to reinstall it I can infer there is some permission error however this hasn't been the case with other pip installed plugin in beets

abc@da948e917481:/lsiopy$ ls -l
total 20
drwxr-xr-x 2 root root 4096 Aug 29 00:45 bin
drwxr-xr-x 4 root root 4096 Aug 29 00:45 include
drwxr-xr-x 3 root root 4096 Aug 29 00:44 lib
lrwxrwxrwx 1 root root    3 Aug 29 00:44 lib64 -> lib
-rw-r--r-- 1 root root  146 Aug 29 00:44 pyvenv.cfg
drwxr-xr-x 3 root root 4096 Aug 29 00:45 share

I can see the target directory /lsiopy/lib/python3.12/site-packages/beets/plugins.py is owned by root

Hence I re-install via root user in beets docker container -> no problems sorted again until next server reboot

WARNING: The directory '/config/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
root@da948e917481:/# pip install beets-beatport4
WARNING: The directory '/config/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Collecting beets-beatport4
  Downloading beets_beatport4-0.3.4-py3-none-any.whl.metadata (6.9 kB)
Requirement already satisfied: beets>=1.6.0 in /lsiopy/lib/python3.12/site-packages (from beets-beatport4) (2.0.0)
Requirement already satisfied: requests in /lsiopy/lib/python3.12/site-packages (from beets-beatport4) (2.32.3)
Requirement already satisfied: confuse in /lsiopy/lib/python3.12/site-packages (from beets-beatport4) (2.0.1)
Requirement already satisfied: jellyfish in /lsiopy/lib/python3.12/site-packages (from beets>=1.6.0->beets-beatport4) (1.1.0)
Requirement already satisfied: mediafile>=0.12.0 in /lsiopy/lib/python3.12/site-packages (from beets>=1.6.0->beets-beatport4) (0.12.0)
Requirement already satisfied: munkres>=1.0.0 in /lsiopy/lib/python3.12/site-packages (from beets>=1.6.0->beets-beatport4) (1.1.4)
Requirement already satisfied: musicbrainzngs>=0.4 in /lsiopy/lib/python3.12/site-packages (from beets>=1.6.0->beets-beatport4) (0.7.1)
Requirement already satisfied: pyyaml in /lsiopy/lib/python3.12/site-packages (from beets>=1.6.0->beets-beatport4) (6.0.2)
Requirement already satisfied: typing-extensions in /lsiopy/lib/python3.12/site-packages (from beets>=1.6.0->beets-beatport4) (4.12.2)
Requirement already satisfied: unidecode>=1.3.6 in /lsiopy/lib/python3.12/site-packages (from beets>=1.6.0->beets-beatport4) (1.3.8)
Requirement already satisfied: charset-normalizer<4,>=2 in /lsiopy/lib/python3.12/site-packages (from requests->beets-beatport4) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /lsiopy/lib/python3.12/site-packages (from requests->beets-beatport4) (3.8)
Requirement already satisfied: urllib3<3,>=1.21.1 in /lsiopy/lib/python3.12/site-packages (from requests->beets-beatport4) (2.2.2)
Requirement already satisfied: certifi>=2017.4.17 in /lsiopy/lib/python3.12/site-packages (from requests->beets-beatport4) (2024.7.4)
Requirement already satisfied: six>=1.9 in /lsiopy/lib/python3.12/site-packages (from mediafile>=0.12.0->beets>=1.6.0->beets-beatport4) (1.16.0)
Requirement already satisfied: mutagen>=1.46 in /lsiopy/lib/python3.12/site-packages (from mediafile>=0.12.0->beets>=1.6.0->beets-beatport4) (1.47.0)
Downloading beets_beatport4-0.3.4-py3-none-any.whl (11 kB)
Installing collected packages: beets-beatport4
Successfully installed beets-beatport4-0.3.4

Install as user inside beets container yeilds

abc@da948e917481:/lsiopy$ pip install beets-beatport4
Collecting beets-beatport4
  Using cached beets_beatport4-0.3.4-py3-none-any.whl.metadata (6.9 kB)
Requirement already satisfied: beets>=1.6.0 in ./lib/python3.12/site-packages (from beets-beatport4) (2.0.0)
Requirement already satisfied: requests in ./lib/python3.12/site-packages (from beets-beatport4) (2.32.3)
Requirement already satisfied: confuse in ./lib/python3.12/site-packages (from beets-beatport4) (2.0.1)
Requirement already satisfied: jellyfish in ./lib/python3.12/site-packages (from beets>=1.6.0->beets-beatport4) (1.1.0)
Requirement already satisfied: mediafile>=0.12.0 in ./lib/python3.12/site-packages (from beets>=1.6.0->beets-beatport4) (0.12.0)
Requirement already satisfied: munkres>=1.0.0 in ./lib/python3.12/site-packages (from beets>=1.6.0->beets-beatport4) (1.1.4)
Requirement already satisfied: musicbrainzngs>=0.4 in ./lib/python3.12/site-packages (from beets>=1.6.0->beets-beatport4) (0.7.1)
Requirement already satisfied: pyyaml in ./lib/python3.12/site-packages (from beets>=1.6.0->beets-beatport4) (6.0.2)
Requirement already satisfied: typing-extensions in ./lib/python3.12/site-packages (from beets>=1.6.0->beets-beatport4) (4.12.2)
Requirement already satisfied: unidecode>=1.3.6 in ./lib/python3.12/site-packages (from beets>=1.6.0->beets-beatport4) (1.3.8)
Requirement already satisfied: charset-normalizer<4,>=2 in ./lib/python3.12/site-packages (from requests->beets-beatport4) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in ./lib/python3.12/site-packages (from requests->beets-beatport4) (3.8)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./lib/python3.12/site-packages (from requests->beets-beatport4) (2.2.2)
Requirement already satisfied: certifi>=2017.4.17 in ./lib/python3.12/site-packages (from requests->beets-beatport4) (2024.7.4)
Requirement already satisfied: six>=1.9 in ./lib/python3.12/site-packages (from mediafile>=0.12.0->beets>=1.6.0->beets-beatport4) (1.16.0)
Requirement already satisfied: mutagen>=1.46 in ./lib/python3.12/site-packages (from mediafile>=0.12.0->beets>=1.6.0->beets-beatport4) (1.47.0)
Using cached beets_beatport4-0.3.4-py3-none-any.whl (11 kB)
Installing collected packages: beets-beatport4
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/lsiopy/lib/python3.12/site-packages/beetsplug/__init__.py'
Check the permissions.

I'm sorry unsure if this is a beets-beatport4 related issue, all help would be appreciated. It doesn't occur with any of my other plugins only beatport4