mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 15:26:01 +03:00
[GH-ISSUE #494] KeyError: 'searchSuggestionRenderer' when using get_search_suggestions with 'a' as query #366
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#366
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 @Johna-123 on GitHub (Dec 27, 2023).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/494
Describe the bug
I get an error when using the
get_search_suggestionsfunction with these parameters:query="a"detailed_runs=TrueHere's the error from Flask:
And this is my code:
I sent a GET request from Firefox to the flask server:
http://127.0.0.1:5000/api/get_search_suggestions?query=a&detailed_runs=trueTo Reproduce
Steps to reproduce the behavior:
get_search_suggestions()function with the following parameters:query="a"detailed_runs=TrueAdditional context
At first I thought single characters may not be supported for the query, but when setting the query as
c, I get a response:The same error also occurs for some other single characters as the query.
The error occurs when
detailed_runsis set to bothTrueandFalse.@sigma67 commented on GitHub (Dec 27, 2023):
Cannot reproduce. Works fine for me. What does your preview look like?
@Johna-123 commented on GitHub (Dec 27, 2023):
You mean what I get in the browser? Error 500.
@sigma67 commented on GitHub (Dec 27, 2023):
So you can't even type this query in your YouTube Music search bar? Seems like something's wrong on your end
@Johna-123 commented on GitHub (Dec 27, 2023):
No, I can type it in YouTube Music and it's works well.
@Johna-123 commented on GitHub (Dec 27, 2023):
The problem seems to occur only when authenticated.
@jcbirdwell commented on GitHub (Dec 29, 2023):
search suggestions is returning historySuggestionRenderer objects mixed in with the searchSuggestionRenderers when authenticated, based on past searches. replicate in test.py with
Adding items to search history seems to be a bit finicky / sometimes takes a second to start getting returned by suggestions., so it may take an extra run or adding a sleep timeout to get the error.