Open holta opened 5 months ago
Possibly related:
@nzola clarififies that these were some of the videos he tried above:
Thank you @EMG70 for clarifying your own experience testing Nzola's 5 links above!
https://www.youtube.com/watch?v=zOHi37jWcro ✅ https://www.youtube.com/watch?v=xQpImggreLE ✅ https://www.youtube.com/@iogacademy/playlists 297 videos in this channel,download failed ❌ https://www.youtube.com/watch?v=5WenPx1krGE&t=90s✅ https://www.youtube.com/@IohkIo/playlists very long channel of 972 videos.I had to cancel it as it took long to initialize ❌
Explanations of errors:
(1) 'NoneType' object cannot be interpreted as an integer : likely due to a missing metadata field like view_count or duration during the metadata fetching task. Restricted videos will throw this error.
(2) 'NoneType' object is not subscriptable: this means the video file was not found. It might a premature check for the file or a failure on xklb side to process the file.
(3) Download appears to be stuck: a timeout issue experienced during the download process. Will be strengthened to avoid false positives.
Last night, I successfully upgraded Calibre-Web on a PI4 and run the video playlist "https://www.youtube.com/@IohkIo/playlists", this is the "PUBLISHING TO URL...https://dpaste.com/ELHD529SS", and this is the results I got on the task view and status view:
@nzola
You've pasted in the wrong iiab-diagnostics:
https://dpaste.com/BGKGBZK7G shows a PC CPU, rather than a Raspberry Pi CPU.
Please run iiab-diagnostics on the Raspberry Pi 4 and post the resulting URL (a dpaste.com pastebin) to this ticket when you can, Thanks!
@nzola
You've pasted in the wrong iiab-diagnostics:
- https://dpaste.com/BGKGBZK7G shows a PC CPU, rather than a Raspberry Pi CPU.
- Please run iiab-diagnostics on the Raspberry Pi 4 and post the resulting URL (a dpaste.com pastebin) to this ticket when you can, Thanks! PUBLISHING TO URL... https://dpaste.com/ELHD529SS
- (1) 'NoneType' object cannot be interpreted as an integer : likely due to a missing metadata field like view_count or duration during the metadata fetching task. Restricted videos will throw this error.
Thanks @deldesir and @EMG70 and @nzola:
Browsing to https://youtu.be/ROgfEuRI6Sw shows:
If the owner of this video has granted you access, please sign in.
While seemingly obvious:
🎨
You're right. The "NoneType" object can stay in the log file, but the user should see a message explaining what's going on. I'll work on this.
Also, a message like "'NoneType' object cannot be interpreted as an integer" strongly indicates that a Python variable type needs validation? 🙃
Let's gather all such/similar reproducible cases. As much as we can in coming weeks. ✊
And stress test these during our move to Ruff-based CI (GitHub Actions), while gradually increasing static type-checking of Python variables!
@deldesir
@nzola says that playlist https://www.youtube.com/@iogacademy/playlists still continues to fail to download — does this mean that older playlists with videos that are "unavailable" or "owner of this video has [NOT] granted you access" need more sophisticated handling?
Metadata fetch: https://www.youtube.com/watch?v=V0zV_xO3Yal failed: 'NoneType' object cannot be interpreted as an integer
Metadata fetch: https://www.youtube.com/watch?v=ROgfEuRI6Sw failed: 'NoneType' object cannot be interpreted as an integer
I see, I'm addressing this with #175 and another PR which will make calculations of views per day failsafe.
I see, I'm addressing this with #175
PR #175 is now merged:
and another PR which will make calculations of views per day failsafe.
Great!
@nzola says that playlist https://www.youtube.com/@iogacademy/playlists still continues to fail to download — does this mean that older playlists with videos that are "unavailable" or "owner of this video has [NOT] granted you access" need more sophisticated handling?
@deldesir it appears playlists/channels are blocked from downloading if even a single YouTube video is "unavailable" or "owner of this video has [NOT] granted you access".
Can this strict approach be made more pragmatic — for educators wanting the bulk of the playlist/channel downloaded — even despite a few videos no longer being available?
(Instead of blocking the full download!)
@nzola says that playlist https://www.youtube.com/@iogacademy/playlists still continues to fail to download — does this mean that older playlists with videos that are "unavailable" or "owner of this video has [NOT] granted you access" need more sophisticated handling?
@deldesir it appears playlists/channels are blocked from downloading if even a single YouTube video is "unavailable" or "owner of this video has [NOT] granted you access".
- Can this strict approach be made more pragmatic — for educators wanting the bulk of the playlist/channel downloaded — even despite a few videos no longer being available?
- (Instead of blocking the full download!)
@deldesir's PR #179 proposes a solution to this problem, please see:
Thanks @nzola for having confirmed!