[PR #540] [MERGED] nav() now displays some debugging information on KeyError #645

Closed
opened 2026-02-27 23:01:49 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/sigma67/ytmusicapi/pull/540
Author: @linsomniac
Created: 2/10/2024
Status: Merged
Merged: 3/1/2024
Merged by: @sigma67

Base: mainHead: debug_key_error


📝 Commits (5)

  • bf2387e nav() now displays some debugging information on KeyError
  • 9819ac1 nav() fix for walking lists.
  • 3b613a8 Restructured nav() to more closely match original.
  • b1692fa nav() catching when element is None as well
  • bddcc64 Moving try/except out of loop

📊 Changes

1 file changed (+3 additions, -4 deletions)

View changed files

📝 ytmusicapi/navigation.py (+3 -4)

📄 Description

There's a user reporting a KeyError in nav(), so I've changed it to print out the key and dict for future debugging. Also, a bare Exception was used to capture a dictionary failure, removed that since my change checks for the existence of the key in the dictionary. If this is objectionable at all, you probably should change it to catching a KeyError rather than catching Exception.

This is to gather information for #539


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/sigma67/ytmusicapi/pull/540 **Author:** [@linsomniac](https://github.com/linsomniac) **Created:** 2/10/2024 **Status:** ✅ Merged **Merged:** 3/1/2024 **Merged by:** [@sigma67](https://github.com/sigma67) **Base:** `main` ← **Head:** `debug_key_error` --- ### 📝 Commits (5) - [`bf2387e`](https://github.com/sigma67/ytmusicapi/commit/bf2387e791a9cb2a5dbe3817d8993cb554baa259) nav() now displays some debugging information on KeyError - [`9819ac1`](https://github.com/sigma67/ytmusicapi/commit/9819ac1871098bebe1fbdae93d92267b60c05fdb) nav() fix for walking lists. - [`3b613a8`](https://github.com/sigma67/ytmusicapi/commit/3b613a8d8c3ed6216d001c4d2b51dc55e0a59db6) Restructured nav() to more closely match original. - [`b1692fa`](https://github.com/sigma67/ytmusicapi/commit/b1692fafc3b37ad36679ee234ebac45ac03007ca) nav() catching when element is None as well - [`bddcc64`](https://github.com/sigma67/ytmusicapi/commit/bddcc64f34c620459417e89205ac04ba9621b3f4) Moving try/except out of loop ### 📊 Changes **1 file changed** (+3 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `ytmusicapi/navigation.py` (+3 -4) </details> ### 📄 Description There's a user reporting a KeyError in nav(), so I've changed it to print out the key and dict for future debugging. Also, a bare Exception was used to capture a dictionary failure, removed that since my change checks for the existence of the key in the dictionary. If this is objectionable at all, you probably should change it to catching a KeyError rather than catching Exception. This is to gather information for #539 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 23:01:49 +03:00
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#645
No description provided.