The issue is caused by a slight change in youtube-dl's metadata output.
After a refactoring, it stores the 'adr' value as a floating -point number, but sinusbot expects an integer.
I patched youtube-dl and restored the old behaviour.
You can find a patched executable on github: https://github.com/Clubfan22/youtube-dl/releases/tag/2021.04.01-sinusbot
However, if you don't trust me (and really, you shouldn't just execute any code found on the internet!), you can build youtube-dl by yourself from my patched version: https://github.com/Clubfan22/youtube-dl
I don't plan on filing an upstream issue for youtube-dl because it really is a problem caused by sinusbot and should be fixed with a sinusbot update.
I uploaded everything according to this, set the path as it was given and unfortunately a few minutes fine and after a while it did not work anymore.chmod o+x /usr/local/bin/youtube-dl-patch-new
if someone is interested i made a update script for youtube dl to work with sinusbot, as it is only one line of code in one file to change, this is very easy to automate. My version is executed inside the root folder, you might want to change that:
#!/bin/bash
cd /root/ytdl/
rm -R *
git clone https://github.com/ytdl-org/youtube-dl
cd /root/ytdl/youtube-dl/youtube_dl/extractor/
perl -i -pe 's/.*/ dct["abr"] = int(tbr) / if $.==1617' youtube.py #you could also use awk or sed if no perl installed
cd /root/ytdl/youtube-dl/
make youtube-dl
cp youtube-dl /usr/local/bin/
keep in mind this is not reliable, if the youtube-dl code changes and the code to change is not longer in line 1617 then it does not work anymore. but for now this should work for some time Hopefully by then we have a sinusbot fix. Sorry for my bad english.
"Zip : not found" you need to sudo apt install zip. Make sure you have installed, Python, Perl, ZIP and Git for this to work. Sorry i'am very bad in writing tutorials or writing in general XDNot sure if this is my bad as I've not used make before but I get this:
mkdir -p zip
for d in youtube_dl youtube_dl/downloader youtube_dl/extractor youtube_dl/postprocessor ; do \
mkdir -p zip/$d ;\
cp -pPR $d/*.py zip/$d/ ;\
done
touch -t 200001010101 zip/youtube_dl/*.py zip/youtube_dl/*/*.py
mv zip/youtube_dl/__main__.py zip/
cd zip ; zip -q ../youtube-dl youtube_dl/*.py youtube_dl/*/*.py __main__.py
/bin/sh: 1: zip: not found
make: *** [Makefile:65: youtube-dl] Error 127
I've compiled the script of @Clubfan into a windows executable. It worked for me.still not working for windows :/
Thanks for your help, I had presumed zip meant .zip and not a program called ZIP"Zip : not found" you need to sudo apt install zip. Make sure you have installed, Python, Perl, ZIP and Git for this to work. Sorry i'am very bad in writing tutorials or writing in general XD
YoutubeDLPath = "/usr/local/bin/youtube-dl"
and restarted the docker image but still no good.Are you sure that your youtube-dl file is stored in "Thanks for your help, I had presumed zip meant .zip and not a program called ZIP
This compiled now hoever when I copy it in and go to Sinusbot it says youtube-dl not found View attachment 4321
I have edited the config.ini to:YoutubeDLPath = "/usr/local/bin/youtube-dl"
and restarted the docker image but still no good.
Any ideas what to try next?
/usr/local/bin/youtube-dl
"yes I can see it here:Are you sure that your youtube-dl file is stored in "/usr/local/bin/youtube-dl
"
Thanks for your help, I had presumed zip meant .zip and not a program called ZIP
This compiled now hoever when I copy it in and go to Sinusbot it says youtube-dl not found View attachment 4321
I have edited the config.ini to:YoutubeDLPath = "/usr/local/bin/youtube-dl"
and restarted the docker image but still no good.
Any ideas what to try next?
Not sure about this docker stuff, i've never used docker images. Have you restarted sinusbot by "sudo service sinusbot restart"? The reason is that i really don't know what this docker stuff is doing. maybe restarting the images only keeps the state in memory....yes I can see it here:
root@docker:/home/bigsby/docker/sinusbot/youtube-dl# ls
youtube-dl youtube-dl-2021.01.16 youtube-dl-2021.04.01
And my docker image has a volume to map this to the /usr/local/bin
View attachment 4322
unless I am missing something (and that is very possible) it should be all correct
No probs, I know not everyone uses the docker file.Not sure about this docker stuff, i've never used docker images. Have you restarted sinusbot by "sudo service sinusbot restart"? The reason is that i really don't know what this docker stuff is doing. maybe restarting the images only keeps the state in memory....
YoutubeDLPath = "/usr/local/bin/youtube-dl-2021.01.16"
& restart the container and the error changes back to so my guess is it is reloading the config but for some reason not working. I will try the file MauriceR put in the thread and see if that works.have you already try the file in: this post? Anyways, i attached my youtube-dl, it compiled yesterday with my scriptNo probs, I know not everyone uses the docker file.
I can't run the restart due to it being containerised but I can switch the youtube-dl version back to:YoutubeDLPath = "/usr/local/bin/youtube-dl-2021.01.16"
& restart the container and the error changes back to View attachment 4323so my guess is it is reloading the config but for some reason not working. I will try the file MauriceR put in the thread and see if that works.
Edit: just realised that is an exe so not going to help me here. Can anyone be so kind as to upload there compiled youtube-dl file for me to try?
Just to check, are you changing the config.ini file to point to the new Youtube-DL filesadly it wont work for my setup, official linux docker (image: sinusbot/docker) i changed the youtube-dl file and set "chmod a+rx youtube-dl"
but it gives the same error on every version of youtube-dl, tried latest, patch from this thread and older.
View attachment 4326
SInusbot version: SinusBot 1.0.0-beta.10-202ee4d
im using a folder setup something like this:Just to check, are you changing the config.ini file to point to the new Youtube-DL file
/home/bigsby/docker/sinusbot/data
is set to YoutubeDLPath = "/usr/local/bin/youtube-dl"
and this way the Youtube-dl version can be swapped out with the compiled version from this forum.it was just as you wrote, it used the baked in version.So for me these are my volumes:
View attachment 4328
my config.ini file located in/home/bigsby/docker/sinusbot/data
is set toYoutubeDLPath = "/usr/local/bin/youtube-dl"
and this way the Youtube-dl version can be swapped out with the compiled version from this forum.
I think you will need to change your connfig.ini file to point to wherever your custom youtube-dl file is otherwise it will just use the one baked into the container.
Hope that helps
No probs & thanks to the rest of the guys in this thread as they helped me fix mineit was just as you wrote, it used the baked in version.
It works now, thanks to your help and the volume path, thank you very much, was my own fault after all