binkle,
@binkle@clubcyberia.co avatar

yt-dlp just needed a sudo in order to working on the NAS :hapyday:

pwm,
@pwm@crlf.ninja avatar

@binkle THATS NOT HOW IT WORKS
YOU CANT JUST PUT sudo IN FRONT OF EVERYTHING AND EXPECT IT TO WORK

binkle,
@binkle@clubcyberia.co avatar

@pwm AND YET IT DOES EVERY SINGLE TIME

prettygood,
@prettygood@socially.drinkingatmy.computer avatar

@binkle @pwm fix your directory permissions ya putz

binkle,
@binkle@clubcyberia.co avatar

@prettygood @pwm pip threw it in /usr/bin/ and the permissions there look fine. It's complaining about "ImportError: cannot import name 'main' from 'yt_dlp' (unknown location)" but I don't know my way around python very well, so I don't know whether there's an obvious reason the location is unknown

prettygood,
@prettygood@socially.drinkingatmy.computer avatar

@binkle @pwm that's part of why I don't fuck with pip, I straight up don't understand what it does, but it sounds like maybe there's some difference in $PATH between your user and root.

phnt,
@phnt@fluffytail.org avatar

@prettygood @binkle @pwm New versions of pip don't even allow you to install stuff into system directories and force you to use python3-venv.

phnt,
@phnt@fluffytail.org avatar

@prettygood @binkle @pwm One of the reasons why I can't fix Invidious on this instance. The IPv6 rotator needs root privileges and I can't install it as root and guess what is missing in all the somewhat official RHEL8 repos. python3-venv. And installing to the user directory and letting root cron access it there is a complete hack and probably would upset SELinux and I'm not feeling writing a policy just for that.

pwm,
@pwm@crlf.ninja avatar

@binkle @prettygood I'm guessing your python path does not include where the yt_dlp module actually is, which is probably wherever pip put it assuming you didn't use a system install
the main yt_dlp script may expect to be in the same directory, or for the module to be in the python path.
you could try adjusting your python path in the shell and seeing if it works, or move the script into wherever it was, then symlinking to it or something

pwm,
@pwm@crlf.ninja avatar

@binkle @prettygood if you want to find your modules
> $ python -c "import sys; print('\n'.join(sys.path))"

binkle,
@binkle@clubcyberia.co avatar

@pwm @prettygood ahhhh there it is - permissions for /usr/lib/python3.8/site-packages/yt_dlp are all fucked. Can't even ls without admin

binkle,
@binkle@clubcyberia.co avatar

@pwm @prettygood alright well I think I've actually made my NAS even LESS secure but now it works without sudo :hapyretard:

pwm,
@pwm@crlf.ninja avatar

@binkle @prettygood OH fuck
Okay here's why it worked with sudo, you sudo pip installed (bad idea) so the module is not in the path of the user you are running as because it's in the root user's system modules

pwm,
@pwm@crlf.ninja avatar

@binkle @prettygood you SHOULD in general not sudo pip install unless you are quite sure that's what you ought to be doing

binkle,
@binkle@clubcyberia.co avatar

@pwm @prettygood ahhh that makes sense. I hadn't considered that

ok so not for any particular reason just out of curiosity but what are the default permissions of the root user's site-packages

pwm,
@pwm@crlf.ninja avatar

@binkle @prettygood I think pip will put them in $HOME/.local/.bin no matter who is running it so if you sudo it it goes under /root/ which of course is inaccessible to normal users.

binkle,
@binkle@clubcyberia.co avatar

@pwm @prettygood turns out this system doesn't actually make a separate $home for each user, which I think is why the tutorial I was following was doing everything as root

FUCK it we're leaving it as is. It'll be a janky mess until the day it dies

eric,
@eric@pl.starnix.network avatar

@binkle @pwm @prettygood bruh install it with your system package manager

binkle,
@binkle@clubcyberia.co avatar

@eric @pwm @prettygood there is no package manager :cryblood:

eric,
@eric@pl.starnix.network avatar

@binkle @pwm @prettygood slackware???????/?

binkle,
@binkle@clubcyberia.co avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • Hentai
  • doujinshi
  • announcements
  • general
  • All magazines