[GH-ISSUE #126] KeyError: 'playNavigationEndpoint' & More? #92

Closed
opened 2026-02-27 22:07:58 +03:00 by kerem · 2 comments
Owner

Originally created by @tombouquet on GitHub (Dec 17, 2020).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/126

Currently getting this error with some of my search's:
Traceback (most recent call last): File "f:/Spotify Python Application/run.py", line 113, in <module> getSong(song) File "f:/Spotify Python Application/run.py", line 18, in getSong data = ytmusic.search(song, filter='songs') File "C:\Users\Tom\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ytmusicapi\mixins\browsing.py", line 119, in search search_results.extend(self.parser.parse_search_results(results, type)) File "C:\Users\Tom\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ytmusicapi\helpers.py", line 78, in _impl return method(self, *method_args, **method_kwargs) File "C:\Users\Tom\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ytmusicapi\parsers\browsing.py", line 30, in parse_search_results search_result['videoId'] = nav( KeyError: 'playNavigationEndpoint'

Using this code:
` ytmusic = YTMusic()

data = ytmusic.search(song, filter='songs')
print(data)
data = data[0]
data = json.dumps(data)
data = json.loads(data)`

My search query is this:
"Joel Fletcher - Swing - Joel Fletcher Remix"
However is not limited to this search query

Image: https://i.imgur.com/shoFsX5.png

I have tried removing the 'song' filter and this give me the results I'm looking for but then I have trouble with data['videoId']

Image: https://i.imgur.com/c1zsPwC.png
JSON Output: https://pastebin.com/YVHUgiwG

Originally created by @tombouquet on GitHub (Dec 17, 2020). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/126 Currently getting this error with some of my search's: ` Traceback (most recent call last): File "f:/Spotify Python Application/run.py", line 113, in <module> getSong(song) File "f:/Spotify Python Application/run.py", line 18, in getSong data = ytmusic.search(song, filter='songs') File "C:\Users\Tom\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ytmusicapi\mixins\browsing.py", line 119, in search search_results.extend(self.parser.parse_search_results(results, type)) File "C:\Users\Tom\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ytmusicapi\helpers.py", line 78, in _impl return method(self, *method_args, **method_kwargs) File "C:\Users\Tom\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ytmusicapi\parsers\browsing.py", line 30, in parse_search_results search_result['videoId'] = nav( KeyError: 'playNavigationEndpoint' ` Using this code: ` ytmusic = YTMusic() data = ytmusic.search(song, filter='songs') print(data) data = data[0] data = json.dumps(data) data = json.loads(data)` My search query is this: "Joel Fletcher - Swing - Joel Fletcher Remix" However is not limited to this search query Image: https://i.imgur.com/shoFsX5.png I have tried removing the 'song' filter and this give me the results I'm looking for but then I have trouble with data['videoId'] Image: https://i.imgur.com/c1zsPwC.png JSON Output: https://pastebin.com/YVHUgiwG
kerem closed this issue 2026-02-27 22:07:58 +03:00
Author
Owner

@sigma67 commented on GitHub (Dec 17, 2020):

Please check again with v0.12.1

<!-- gh-comment-id:747290347 --> @sigma67 commented on GitHub (Dec 17, 2020): Please check again with v0.12.1
Author
Owner

@tombouquet commented on GitHub (Dec 17, 2020):

LEGEND! FIxed

<!-- gh-comment-id:747323313 --> @tombouquet commented on GitHub (Dec 17, 2020): LEGEND! FIxed
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#92
No description provided.