beetbox / beetbox/beets

Improve chroma logging on fatal errors

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

Description

When I execute a command

```
beet im -C -w -a -p .
```
I'm getting the following output:
```
Resuming interrupted import of /media/sda3/Music
python3: /usr/src/debug/chromaprint/chromaprint-1.5.1/src/audio_processor.cpp:148: virtual void chromaprint::AudioProcessor::Consume(const int16_t*, int): Assertion `length % m_num_channels == 0' failed.
[1] 936677 IOT instruction (core dumped) beet im -C -w -a -p .
```
I think it misses critical information: which file it happened on. I could probably fix or delete the file, but currently, the application crashes and there is no way to find out which file it happened on.

Do you think it's something worth improving?

_Originally posted by @asm0dey in https://github.com/beetbox/beets/discussions/5601_

Contributor guide

Open the contributing guide

Research direction

Start with the `beet im -C -w -a -p .` import entry point and reproduce the fatal Chromaprint error. Trace how the current import progress and error output are logged, then identify how the current file can be included. Done means a fatal error reports the file being processed so it can be fixed or removed.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.