You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Could not retrieve a transcript for the video https://www.youtube.com/watch?v=[...] This is most likely caused by: Subtitles are disabled for this video If you are sure that the described cause is not responsible for this error and that a transcript should be retrievable, please create an issue at https://github.com/jdepoix/youtube-transcript-api/issues. Please add which version of youtube_transcript_api you are using and provide the information needed to replicate the error. Also make sure that there are no open issues which already describe your problem!
for every video I try.
The text was updated successfully, but these errors were encountered:
Fixesvacmar01#4
Fix transcript retrieval error for YouTube videos.
* Add a try-except block in `get_transcript` method in `y2a/clients.py` to catch `YouTubeTranscriptApi.CouldNotRetrieveTranscript` exception and log a warning if subtitles are disabled.
* Modify `create_or_get_video` method in `cards/models.py` to handle empty transcripts by setting `transcript` field to "No transcript available" if the transcript is empty.
* Update error handling in `generate` view in `cards/views.py` to display a user-friendly message if transcript retrieval fails by setting `context['error']` to "Transcript not available for this video" if the transcript is "No transcript available".
Possible solution that may have caused crashes due to videos having transcript / closed captions disabled.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/vacmar01/youtube2anki/issues/4?shareId=XXXX-XXXX-XXXX-XXXX).
I'm getting an error like
for every video I try.
The text was updated successfully, but these errors were encountered: