-
Notifications
You must be signed in to change notification settings - Fork 8
json2glm.py outputs a cryptic error #306
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Problem description
The following output is generated when loading the attached JSON model. There is insufficient information to diagnose the cause of the error.
Traceback (most recent call last):
File "/usr/local/opt/gridlabd/4.3.14-250315-develop-darwin_23-x86_64/share/gridlabd/json2glm.py", line 245, in <module>
main()
File "/usr/local/opt/gridlabd/4.3.14-250315-develop-darwin_23-x86_64/share/gridlabd/json2glm.py", line 53, in main
convert(ifile=filename_json,ofile=filename_glm,json_type=json_type,noclock=clockflag,ignore_globals=ignored_globals_list)
File "/usr/local/opt/gridlabd/4.3.14-250315-develop-darwin_23-x86_64/share/gridlabd/json2glm.py", line 127, in convert
if p_info['access'] == "PUBLIC" and p_info['value'] and 'infourl' not in p_id and "::" not in p_id and p_id not in globals_ignore:
TypeError: string indices must be integers
ERROR [INIT] : GldMain::subcommand(format='%s %s -i '%s' -o '%s' %s',...): command '/usr/local/opt/gridlabd/4.3.14-250315-develop-darwin_23-x86_64/bin/python3 /usr/local/opt/gridlabd/4.3.14-250315-develop-darwin_23-x86_64/share/gridlabd/json2glm.py -i '4bus_test.json' -o '4bus_test.glm' ' returns code 1
ERROR [INIT] : /usr/local/opt/gridlabd/4.3.14-250315-develop-darwin_23-x86_64/share/gridlabd/json2glm.py: return code 1
FATAL [INIT] : shutdown after command line rejected
Steps to reproduce
Run the following command on the attached file
gridlabd -C 4bus_test.glm
Expected behavior
The model should compile run ok.
System information
- GridLAB-D version:
Arras Energy 4.3.14-250315 (develop) Darwin - Operating system:
Darwin MacBook-Pro-2.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:09:52 PDT 2024; root:xnu-10063.121.3~5/RELEASE_X86_64 x86_64
Supporting information
The attached file was generated by the model/gld.py in the slacgismo/regrow project.
Attachments
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Issues