mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 23:36:00 +03:00
[GH-ISSUE #450] 'setvideoid' error on .get_history() #334
Labels
No labels
a/b
bug
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
yt-error
yt-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ytmusicapi#334
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AsukoRin on GitHub (Oct 6, 2023).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/450
ytmusic = ytmusicapi.YTMusic(os.environ["browserjson"]) history = ytmusic.get_history() last_listened_song = history[0] if history else {}history = ytmusic.get_history() gives a KeyError: 'setVideoId' even though it isn't editing or moving playlist items. A couple days ago the code worked normally with no errors and now it doesn't. I have tried to refresh the browser.json file (firefox) and object is created correctly:
<ytmusicapi.ytmusic.YTMusic object at 0x7fd50a96ea10>However code still gives a key error, occasionally changing to Error: 'none'
Larger Snippet:
def get_last_listened_song(): global last_listened_song while True: try: history = ytmusic.get_history() print(history) last_listened_song = history[0] if history else {} print('done') time.sleep(5) except Exception as e: print("Error:", str(e))My first time writing a bug report so sorry if I did something wrong :p
@sigma67 commented on GitHub (Oct 6, 2023):
Please follow the standard issue bug template. Have you noticed any unusual changes in the web UI of your history?
music.youtube.com/history
@AsukoRin commented on GitHub (Oct 6, 2023):
It seems about the same, but there might have been some small change that I haven't noticed. I am still signed in as well
@joulev commented on GitHub (Oct 9, 2023):
Same here too, the following stopped working with the exact same error
Web UI of YouTube Music history page looks the same.
@joulev commented on GitHub (Oct 12, 2023):
Without any changes to the code, it suddenly works again at least from today.
@AsukoRin commented on GitHub (Oct 13, 2023):
Still having the same issue
@sigma67 commented on GitHub (Oct 23, 2023):
closing this in favor of #462