You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the config check finds an invalid key, we get UnboundLocalError: local variable 'key' referenced before assignment, since key is not defined. EXPT_DEFAULT_CONFIG_FN is also not defined.
It would be better if the info about the invalid key were included in the error message, instead of as a normal print higher up in the log. (And better if the error message worked properly.)
Current behavior
Example
> ./generate_FV3LAM_wflow.py
========================================================================
Starting experiment generation...
========================================================================
========================================================================
Starting function setup() in "setup.py"...
========================================================================
INVALID ENTRY: RESTART_WORKFLOW=True
*********************************************************************
FATAL ERROR:
Experiment generation failed. See the error message(s) printed below.
For more detailed information, check the log file from the workflow
generation script: /scratch2/NAGAPE/arl/Zachary.Moon/git/ufs-srweather-app_arl/ush/log.generate_FV3LAM_wflow
*********************************************************************
Traceback (most recent call last):
File "/scratch2/NAGAPE/arl/Zachary.Moon/git/ufs-srweather-app_arl/ush/./generate_FV3LAM_wflow.py", line 822, in <module>
generate_FV3LAM_wflow(USHdir, wflow_logfile)
File "/scratch2/NAGAPE/arl/Zachary.Moon/git/ufs-srweather-app_arl/ush/./generate_FV3LAM_wflow.py", line 70, in generate_FV3LAM_wflow
expt_config = setup(ushdir)
File "/scratch2/NAGAPE/arl/Zachary.Moon/git/ufs-srweather-app_arl/ush/setup.py", line 299, in setup
expt_config = load_config_for_setup(USHdir, default_config_fp, user_config_fp)
File "/scratch2/NAGAPE/arl/Zachary.Moon/git/ufs-srweather-app_arl/ush/setup.py", line 87, in load_config_for_setup
User-specified variable "{key}" in {user_config} is not valid
UnboundLocalError: local variable 'key' referenced before assignment
Machines affected
I assume all, but tested on Hera.
Steps To Reproduce
Run generate workflow with a config.yaml that has a key that isn't in the default config file.
Detailed Description of Fix (optional)
Additional Information (optional)
Possible Implementation (optional)
Output (optional)
The text was updated successfully, but these errors were encountered:
If the config check finds an invalid key, we get
UnboundLocalError: local variable 'key' referenced before assignment
, sincekey
is not defined.EXPT_DEFAULT_CONFIG_FN
is also not defined.ufs-srweather-app/ush/setup.py
Lines 81 to 91 in d1aebf4
cc: @drnimbusrain
Expected behavior
It would be better if the info about the invalid key were included in the error message, instead of as a normal print higher up in the log. (And better if the error message worked properly.)
Current behavior
Example
Machines affected
I assume all, but tested on Hera.
Steps To Reproduce
Run generate workflow with a
config.yaml
that has a key that isn't in the default config file.Detailed Description of Fix (optional)
Additional Information (optional)
Possible Implementation (optional)
Output (optional)
The text was updated successfully, but these errors were encountered: