Dangling node in yaml file causes difficult error message
- Dominant language
- Python
- Stars
- 8
- Forks
- 16
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 7
Description
Attempt at reconstruction (taken from an example, not the real user config):
```
input:
eclroot: ../xtgeo-testdata/3dgrids/reek/REEK
grid: $eclroot.EGRID
# alternative approach to read a variables and dates:
properties:
-
name: PORO
source: $eclroot.INIT
-
name: SWAT
source: $eclroot.UNRST
dates: !include_from tests/yaml/global_config3a.yml::global.DATES
diffdates: !include_from tests/yaml/global_config3a.yml::global.DIFFDATES
-
# name: PRESSURE
# source: $eclroot.UNRST
# dates: !include_from tests/yaml/global_config3a.yml::global.DATES
# diffdates: !include_from tests/yaml/global_config3a.yml::global.DIFFDATES
```
The dangling dash `-` causes the error `TypeError: argument of type 'NoneType' is not iterable` from line 242 in `_configparser.py` which does ` if 'name' not in prop `
Contributor guide
Research direction
Start in _configparser.py at line 242 and reproduce the issue with the dangling dash shown in the YAML example. Trace how the list item becomes None; done means the malformed entry produces a clear, actionable error instead of the NoneType traceback.
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
- 48/100