missing data in RTS-GMLC.json
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Got the following error when I use the latest Egret:
/Users/chiang7/project/2025/PCM/egrets_folks/egret-tests/test_cases/RTS-GMLC.json
Traceback (most recent call last):
File "/Users/chiang7/project/2025/PCM/egrets_folks/egret-tests/egret_driver.py", line 57, in <module>
md_in = ModelData.read(json_file)
File "/Users/chiang7/project/2025/PCM/egrets_folks/egret-int/egret/data/model_data.py", line 189, in read
return cls(source=du._read_from_file(filename, file_type))
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/Users/chiang7/project/2025/PCM/egrets_folks/egret-int/egret/data/data_utils.py", line 117, in _read_from_file
data = create_model_data_dict(filename)
File "/Users/chiang7/project/2025/PCM/egrets_folks/egret-int/egret/parsers/ctm_parser.py", line 157, in create_model_data_dict
data = ctmdata_2_model_data_dict(ctm)
File "/Users/chiang7/project/2025/PCM/egrets_folks/egret-int/egret/parsers/ctm_parser.py", line 104, in ctmdata_2_model_data_dict
elements['generator'] = ctm_gen_to_md(ctm.network.gen, ctm.time_series_data,
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ctm.temporal_boundary.gen,
^^^^^^^^^^^^^^^^^^^^^^^^^^
system, elements)
^^^^^^^^^^^^^^^^^
File "/Users/chiang7/project/2025/PCM/egrets_folks/egret-int/egret/parsers/ctm_parser.py", line 387, in ctm_gen_to_md
tmp_boundary_uids = list((g.uid for g in ctm_temporal_boundary_gen))
^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
I believe some data is missing in this model.
@iaravena
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start with test_cases/RTS-GMLC.json and the traceback path in egret/parsers/ctm_parser.py, especially ctm_gen_to_md and the temporal_boundary.gen input. Determine which model data is absent and how the parser expects it to be represented. Done means RTS-GMLC.json loads through ModelData.read without the NoneType iteration error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100