beetbox / beetbox/beets

Generic "ReadError" logged when writing lyrics

Open
#6,069 4 comments 0 reactions 0 assignees View on GitHub
lyrics
Dominant language
Python
Stars
15.7k
Forks
2.1k
Avg merge
4d 21h
Merged PRs (30d)
31

Description

### Problem

Running this command in verbose (`-vv`) mode:

```sh
$ beet -vv lyrics
```

Led to this problem:

```
user configuration: /home/moon/.config/beets/config.yaml
data directory: /home/moon/.config/beets
plugin paths:
fetchart: google: Disabling art source due to missing key
fetchart: lastfm: Disabling art source due to missing key
Sending event: pluginload
library database: /data/Music/library.db
library directory: /data/Music
Sending event: library_opened
Parsed query: AndQuery([OrQuery([SubstringQuery('artist', 'evanescence', fast=True), SubstringQuery('title', 'evanescence', fast=True), SubstringQuery('comments', 'evanescence', fast=True), SubstringQuery('album', 'evanescence', fast=True), SubstringQuery('albumartist', 'evanescence', fast=True), SubstringQuery('genre', 'evanescence', fast=True)]), OrQuery([SubstringQuery('artist', 'going', fast=True), SubstringQuery('title', 'going', fast=True), SubstringQuery('comments', 'going', fast=True), SubstringQuery('album', 'going', fast=True), SubstringQuery('albumartist', 'going', fast=True), SubstringQuery('genre', 'going', fast=True)]), OrQuery([SubstringQuery('artist', 'under', fast=True), SubstringQuery('title', 'under', fast=True), SubstringQuery('comments', 'under', fast=True), SubstringQuery('album', 'under', fast=True), SubstringQuery('albumartist', 'under', fast=True), SubstringQuery('genre', 'under', fast=True)])])
Parsed sort: NullSort()
lyrics: LyricsPlugin: Fetching lyrics for Evanescence - Going Under
lyrics: LRCLib: Fetching JSON from https://lrclib.net/api/search?artist_name=Evanescence&track_name=Going+Under
lyrics: LyricsPlugin: 🟢 Found lyrics: Evanescence - Fallen - Going Under
Sending event: write
error reading , >
Sending event: database_change
Sending event: cli_exit
```

### Setup

* OS: NixOS 25.05
* Python version: 3.12.11
* beets version: 2.3.1
* Turning off plugins made problem go away (yes/no): N/A

No other real ideas about what could be causing the error but the lyrics are never saved to the file, only the database. Already checked file permissions which have caused errors like this previously but nothing amiss there.

Mostly I find it frustrating that I have absolutely no information with which to diagnose the problem. Seeing "ReadError object" anywhere in a non-verbose output (in which it does show up) is a bit off-putting in general.

My configuration (output of `beet config`) is:

```yaml
directory: /data/Music
# --------------- Main ---------------

library: /data/Music/library.db

# --------------- Plugins ---------------

plugins: fromfilename discogs spotify fetchart lyrics
spotify:
source_weight: 0.6
mode: list
tiebreak: popularity
show_failures: no
artist_field: albumartist
album_field: album
track_field: title
region_filter:
regex: []
client_id: REDACTED
client_secret: REDACTED
tokenfile: spotify_token.json

import:
write: yes
incremental: yes
lyrics:
synced: yes
sources: [lrclib, genius, tekstowo]
auto: yes
translate:
api_key: REDACTED
from_languages: []
to_language:
dist_thresh: 0.11
google_API_key: REDACTED
google_engine_ID: REDACTED
genius_api_key: REDACTED
fallback:
force: no
local: no
print: no
fetchart:
auto: yes
minwidth: 0
maxwidth: 0
quality: 0
max_filesize: 0
enforce_ratio: no
cautious: no
cover_names:
- cover
- front
- art
- album
- folder
sources:
- filesystem
- coverart
- itunes
- amazon
- albumart
- cover_art_url
store_source: no
high_resolution: no
deinterlace: no
cover_format:
google_key: REDACTED
google_engine: REDACTED
fanarttv_key: REDACTED
lastfm_key: REDACTED
discogs:
apikey: REDACTED
apisecret: REDACTED
tokenfile: discogs_token.json
source_weight: 0.5
user_token: REDACTED
separator: ', '
index_tracks: no
append_style_genre: no
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `beet -vv lyrics ` with the reported configuration and follow the `Sending event: write` log entry. Trace where the generic `ReadError` is emitted and where lyrics are written; done means the lyrics are saved successfully or the error identifies the underlying cause clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.