NOAA-GFDL/MDTF-diagnostics

cli.py error in ocn_surf_flux_diag POD

Closed this issue · 6 comments

Bug Severity

  • 1 = Minor problem that does not affect total framework functionality (e.g., computation error in a POD, problem with logging output, or an issue on a single system
  • 2 = Major problem that affects overall functionality, but that does not occur for all users (e.g., problems installing the framework with a specific Conda version, a framework option that causes one or more PODs to fail, or missing/incompatible Python modules).
  • 3 = Catastrophic problem that occurs frequently for multiple users and/or on multiple systems (e.g.,framework consistently fails to install on multiple systems, or one or more PODs continuously fails after running successfully)

Describe the bug
When I tested the ocn_surf_flux_diag POD, it will shows the following error message:
##/archive/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics> ./mdtf_slurm ./sites/NOAA_GFDL/default_gfdl.jsonc --site NOAA_GFDL -v
DEBUG: Console loggers configured.
=== Starting /arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/mdtf_framework.py

CRITICAL: **********************************************************************
Uncaught exception:
Traceback (most recent call last):
File "/archive/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/mdtf_framework.py", line 67, in
exit_code = main(argv)
File "/archive/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/mdtf_framework.py", line 61, in main
framework = cli_obj.dispatch()
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/cli.py", line 1334, in dispatch
self.imports[key] = plugin_cmd.import_target(self.config.get('data_type'))
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/cli.py", line 595, in import_target
if ("multi" in data_type.lower() and "multirun" in cls_name.lower()
AttributeError: 'NoneType' object has no attribute 'lower'

Steps To Reproduce
Working at: /archive/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics, using the following command:
./mdtf_slurm ./sites/NOAA_GFDL/default_gfdl.jsonc --site NOAA_GFDL -v

Environment
Describe the system environment:

  • OS: [e.g. RHEL 7.2]
  • Conda version: [the conda info command will provide the installation information]
  • branch name and link: [git hash/branch: d6364c2 (on test0716)]

Log information and/or terminal output
There is no log file if I run it on batch

@Wen-hao-Dong try adding the lines "data_type": "single_run", to the section where data_manager is defined. Edit: I already fixed this the main branch, but add the line to your local copy of the default_gfdl.jsonc file if it is missing.

@wrongkindofdoctor 'data_type' is already set to 'single_run'
88 // Method used to fetch model data.
89 "data_manager": "GFDL_PP",
90
91 // Data type that PODs will run
92 // "single_run" (default) or "multi_run"
93 "data_type": "single_run",

@Wen-hao-Dong The commit hash is several months old, and test branch is not up to date with the NOAA-GFDL main branch based on what is on your remote fork. Sync your fork with the NOAA-GFDL main branch (i.e., click the sync fork-->update branch for the main branch and any active test branches in your fork). Then, pull the updates from your fork into your local test branch.

@wrongkindofdoctor I got the same error when I updated my test branch. The commit hash now is 5137b8c (on test 0716).

=== Starting /arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/mdtf_framework.py

CRITICAL: **********************************************************************
Uncaught exception:
Traceback (most recent call last):
File "/archive/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/mdtf_framework.py", line 67, in
exit_code = main(argv)
File "/archive/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/mdtf_framework.py", line 61, in main
framework = cli_obj.dispatch()
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/cli.py", line 1334, in dispatch
self.imports[key] = plugin_cmd.import_target(self.config.get('data_type'))
File "/arch0/wnd/MDTF-GFDL/mdtf/MDTF-diagnostics/src/cli.py", line 595, in import_target
if ("multi" in data_type.lower() and "multirun" in cls_name.lower()
AttributeError: 'NoneType' object has no attribute 'lower'

What I usually do is update my fork>>update my master>>update my test branch. But I could be wrong doing this. Please let me know if the current test is not the latest version.

@wrongkindofdoctor just realized this is not the problem. It fails due to the data request failure, I will update this soon.

@Wen-hao-Dong Okay, thanks for keeping me in the loop. Your fork/branch updating procedure looks good to me. The only thing I recommend is checking for updates weekly since I'm doing a lot of active development at this time (fixing PODs, upgrading the conda environments, etc...). Let me know if you're still having trouble.