Improve error messages with custom serde deserialisation functions
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
Research direction
Start by locating the custom serde deserialisation functions and the CSV input-loading path, then compare their errors with the clearer TOML output shown here. Done means CSV deserialisation errors provide similarly clear context for invalid values, while preserving the existing record and line information.
Written by the indexing model from the issue text.
Description
The lack of clarity in the error output is consistent with other times this custom deserialisation is used in the code.
One thing worth noting, is that when it is used with a toml input file, the error message is quite clear. For example
[16:53:05 ERROR muse2] Failed to load model.
Caused by:
0: Error reading /private/var/folders/td/5nhj1569101bqjj_vmltr_7r0000gp/T/.tmpaxxQee/circularity/model.toml
1: TOML parse error at line 2, column 19
|
2 | capacity_margin = -0.3
| ^^^^
Value must be a finite number greater than or equal to zero
But it's less clear with CSV input files
[16:53:19 ERROR muse2] Failed to load model.
Caused by:
0: Error reading /private/var/folders/td/5nhj1569101bqjj_vmltr_7r0000gp/T/.tmpzLMuo8/circularity/agent_commodity_portions.csv
1: CSV deserialize error: record 11 (line: 12, byte: 246): Value must be > 0 and <= 1
Originally posted by @AdrianDAlessandro in https://github.com/EnergySystemsModellingLab/MUSE2/issues/1485#issuecomment-5282971078
- Dominant language
- Rust
- Stars
- 8
- Forks
- 5
- Avg merge
- 11h 31m
- Merged PRs (30d)
- 33
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EnergySystemsModellingLab/MUSE2
-
bug documentation
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
EnergySystemsModellingLab/MUSE2#1367 · 1 comment ·
-
Remove the `ironing out iteration 0` prefix from debug files when the ironing out loop is turned off Openmuse xiii question
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
EnergySystemsModellingLab/MUSE2#1221 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
EnergySystemsModellingLab/MUSE2#1554 ·
-
bug
EnergySystemsModellingLab/MUSE2#1541 · 2 comments · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
EnergySystemsModellingLab/MUSE2#1526 ·
All issues in EnergySystemsModellingLab/MUSE2
Similar issues
-
bug github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
registrystack/registry-stack#1393 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
rocky-data/rocky#2181 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Openbot:ai-assisted component:indexer QA-roadmap status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
midnightntwrk/midnight-indexer#1557 ·