Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error adding URL: 500 (KeyError: 'id') - But Video can be downloaded when using yt-dlp directly #366

Open
Hely0n opened this issue Jan 2, 2024 · 2 comments

Comments

@Hely0n
Copy link

Hely0n commented Jan 2, 2024

I just tested MeTube a little bit and I recognized an error for a non-youtube Video that normally works with yt-dlp.

When I try to add it, a popup appears, saying "Error adding URL: 500 Internal Server Error
Server got itself in trouble"

And the logs say:

INFO:ytdl:playlist detected with 1 entries
ERROR:aiohttp.server:Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 543, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/main.py", line 125, in add
status = await dqueue.add(url, quality, format, folder, custom_name_prefix, auto_start)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/ytdl.py", line 313, in add
return await self.__add_entry(entry, quality, format, folder, custom_name_prefix, auto_start, already)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/ytdl.py", line 270, in __add_entry
etr["playlist"] = entry["id"]
~~~~~^^^^^^
KeyError: 'id'

The link I tried is only available in Germany, so I think it won't help for debugging, but maybe the logs will be enough.

@PikuZheng
Copy link
Contributor

Yes, non-YouTube websites may not be able to read the video ID. Have you tried a single download instead of a playlist?

@Hely0n
Copy link
Author

Hely0n commented Jan 2, 2024

Ah, that must be the culprit. The video on this page is internally split up into multiple parts, where the video player may insert ads between them. Thats why one have to use the "--concat-playlist always" flag of yt-dlp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants