Bug 510453

Summary: KeyError when performing music search
Product: [Applications] audiotube Reporter: bugs-kde
Component: generalAssignee: Jonah Brüchert <jbb>
Status: REPORTED ---    
Severity: crash    
Priority: NOR    
Version First Reported In: 25.08.1   
Target Milestone: ---   
Platform: Flatpak   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: error_message

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 ?