beetbox / beetbox/confuse

Failure to read default config file silently ignored

Open
#53 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
424
Forks
57
PR merge metrics
No merged PRs in 30d

Description

In beets we noticed (see beetbox/beets#3264) that when confuse can't read the default config file it silently ignores the problem:
https://github.com/beetbox/confuse/blob/04fd862963b0c1adb2cb81e4d97169869e88f2a9/confuse.py#L935-L939
Since beets was assuming that the file existed and was readable so that default config values were set, it led to some very obscure error messages about missing config fields.

This would have been a lot easier to debug if confuse threw an exception or something to indicate that the file was missing. Maybe some users of confuse don't need a default config file, but for those that do it seems that they would always expect it to be present.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at confuse.py lines 935-939, where failure to read the default config file is currently handled, and trace how callers receive that result. Confirm the expected behavior for a missing or unreadable default file; done means the failure is no longer silently ignored and users receive an explicit indication of the problem.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.