Bug 510453 - KeyError when performing music search
Summary: KeyError when performing music search
Status: REPORTED
Alias: None
Product: audiotube
Classification: Applications
Component: general (other bugs)
Version First Reported In: 25.08.1
Platform: Flatpak Linux
: NOR crash
Target Milestone: ---
Assignee: Jonah Brüchert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-10 12:11 UTC by bugs-kde
Modified: 2025-10-10 12:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
error_message (37.28 KB, text/plain)
2025-10-10 12:11 UTC, bugs-kde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bugs-kde 2025-10-10 12:11:10 UTC
Created attachment 185644 [details]
error_message

# Bug Report for AudioTube

## Description

When performing a music search in AudioTube, the application do nothing with a KeyError indicating that the expected 'header' key cannot be found in the YouTube Music API response structure.

This issue is probably related to a known upstream problem in the ytmusicapi library, which has been fixed in version 1.11.1.

## STEPS TO REPRODUCE

1. Launch AudioTube (Flatpak version)
2. Navigate to the search functionality
3. Search for any music (e.g., "Dreams (2004 Remaster)")
4. Application throws a KeyError and fails to display results

## OBSERVED RESULT

The search results cannot be displayed, and application print the following error:
```
KeyError: "Unable to find 'header' using path ['header', 'musicCardShelfHeaderBasicRenderer', 'title', 'runs', 0, 'text'] on ..."
```

## EXPECTED RESULT

The application should successfully parse the YouTube Music API response and display the search results.

## SOFTWARE/OS VERSIONS

- **Installation Method**: Flatpak
- **Operating System**: EndeavourOS
- **KDE Plasma Version**: 6.4.5
- **KDE Frameworks Version**: 6.18.0
- **Qt Version**: 6.9.2
- **Kernel Version**: 6.16.8-arch3-1 (64-bit)
- **Graphics Platform**: Wayland
- **Processors**: 16 × AMD Ryzen 7 PRO 6850U with Radeon Graphics
- **Memory**: 32 GiB of RAM (30.1 GiB usable)
- **Graphics Processor**: AMD Radeon Graphics

## ADDITIONAL INFORMATION

This issue is probably caused by changes in the YouTube Music API response structure. The problem has been identified and fixed in a ytmusicapi issue : https://github.com/sigma67/ytmusicapi/issues/799

According to sigma67 (ytmusicapi maintainer), this has been resolved in **ytmusicapi version 1.11.1**.
AudioTube probably needs to update its dependency to ytmusicapi >= 1.11.1 to resolve this issue. No ?