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

Lots of warnings WARNING:player data has no entry for en: list index out of range #216

Open
benoit74 opened this issue Jul 11, 2024 · 2 comments · May be fixed by #227
Open

Lots of warnings WARNING:player data has no entry for en: list index out of range #216

benoit74 opened this issue Jul 11, 2024 · 2 comments · May be fixed by #227

Comments

@benoit74
Copy link
Collaborator

We regularly have significant numbers of warnings WARNING:player data has no entry for en: list index out of range

This happens for instance once for 3d printing topic (which is quite small, so this is cool to debug):

[ted2zim::2024-07-10 13:00:14,290] WARNING:player data has no entry for en: list index out of range
[ted2zim::2024-07-10 13:09:10,718] INFO:Total video links found in 3d printing: 14

Sample command to see the "bug":

ted2zim --name "ted_test" --topics "3d printing" --format webm --low-quality --tmp-dir tmp --output output

Problem seems to occur on https://ted.com/talks/dan_walker_can_we_print_smart_objects video

I'm not sure but this looks like an intentional WARNING saying "something is probably not ok", even if a fallback is available.

We should have a look at why this is occurring to confirm whether this is just "normal" (but then we should probably move the log level to debug, it is mostly useless to have so many "normal" warnings) or if there is a real issue to solve.

@elfkuzco
Copy link
Contributor

elfkuzco commented Sep 21, 2024

Um, this happens mostly because there is no available subtitle for the video in the language. I examined the player data and the languages list is empty which means there is no subtitle for the video. Visited the link to confirm and it definitely seems to be the case. IMO, I think it's a good logging level because the user can see that there is an indication of something wrong but the program is still working as expected. In the case of the code, the language is set to a default for the native language.

EDIT: Keeping it at a debug level, the information could be hidden and that might not be particularly useful to the user. However, I think we can re-word the error to be more descriptive. What do you think?

@benoit74
Copy link
Collaborator Author

Thank you for the analysis. I like the idea of re-wording the message, especially if we can including information about which video is concerned (its slug or something like that).

@elfkuzco elfkuzco linked a pull request Sep 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants