Open jmatsushita opened 1 year ago
Running yt-dlp
directly from within the container works
▶ docker compose exec api bash
root@04d350116702:/webapp# yt-dlp https://www.youtube.com/watch?v=XutKfAL7wx8
[youtube] Extracting URL: https://www.youtube.com/watch?v=XutKfAL7wx8
[youtube] XutKfAL7wx8: Downloading webpage
[youtube] XutKfAL7wx8: Downloading ios player API JSON
[youtube] XutKfAL7wx8: Downloading android player API JSON
[youtube] XutKfAL7wx8: Downloading m3u8 information
[info] XutKfAL7wx8: Downloading 1 format(s): 616+251
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 48
[download] Destination: Khruangbin - August 10 [XutKfAL7wx8].f616.mp4
[download] 100% of 26.64MiB in 00:00:11 at 2.41MiB/s
[download] Destination: Khruangbin - August 10 [XutKfAL7wx8].f251.webm
[download] 100% of 4.39MiB in 00:00:00 at 9.22MiB/s
[Merger] Merging formats into "Khruangbin - August 10 [XutKfAL7wx8].webm"
Deleting original file Khruangbin - August 10 [XutKfAL7wx8].f251.webm (pass -k to keep)
Deleting original file Khruangbin - August 10 [XutKfAL7wx8].f616.mp4 (pass -k to keep)
root@04d350116702:/webapp#
And the sanity check:
# yt-dlp --version
2023.07.06
I see I missed some relevant logs:
spleeter-web-nginx-1 | 100.70.7.21 - - [05/Sep/2023:10:56:45 +0000] "GET /api/source-file/youtube/?link=https:%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXutKfAL7wx8 HTTP/1.1" 400 69 "http://100.70.7.21/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" "-"
spleeter-web-api-1 | 2023-09-05 10:56:45,115 [django.request][WARNING]: Bad Request: /api/source-file/youtube/
I used the chrome inspector and see that there is a response for the call to http://x.x.x.x/api/source-file/youtube/?link=https:%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXutKfAL7wx
{"status": "error", "errors": ["Invalid YouTube link."]}
That seems to be the same error than this issue https://github.com/JeffreyCA/spleeter-web/issues/519 however note that the error doesn't display on the frontend unlike the first screenshot on that issue.
Seems the error is thrown here https://github.com/JeffreyCA/spleeter-web/blob/df53bf3eb0fd543b4d57ee0e57267a546aa78652/api/validators.py#L45-L56
I'll try and log the message for that DownloadError exception.
Ah ha! I removed the outer try/except
block and see this error being raised
{"status": "duplicate", "id": "63919df5-9081-4a5b-af26-20dd9551255a"}
It makes sense as there was a previous attempt that failed in the database. And indeed if I remove that previous entry, everything works!
I'll keep the ticket open as a reminder that maybe error reporting could be improved here (and seems to also not work as it did previously compared to the linked issue's screenshot) by adding extra information from the DownloadError
exception to the raised ValidationError
.
Thanks again for the great project :pray:
Thanks for the detailed issue! Just to clarify, did you just delete the track from the UI and reimported the link? Or did you have to manually delete it from the database?
When inputting a youtube link in the upload modal, the spinner resolves as a cross and it's not possible to click next, and the following logs are emitted:
I'm running the latest gpu containers: