OceanDataTools / openrvdas

An open source data acquisition system designed for use on research vessels and other scientific installations
http://openrvdas.org
Other
39 stars 20 forks source link

load_configuration fails cryptically if logger config is misspecified #381

Closed davidpablocohn closed 3 months ago

davidpablocohn commented 4 months ago

Configuration loader fails cryptically if a logger config is improperly indented:

   my_logger->on:
   readers:
      ...

instead of

   my_logger->on:
     readers:
        ...

Error when using web GUI:

TypeError at /choose_file/
argument of type ‘NoneType’ is not iterableRequest Method:  POST
Request URL:  http://rr-openrvdas.ucsd.edu/choose_file/
Django Version:  3.2.25
Exception Type:  TypeError
Exception Value:  argument of type ‘NoneType’ is not iterableException Location:  /opt/openrvdas/./django_gui/django_server_api.py, line 725, in load_configuration
Python Executable:  /opt/openrvdas/venv/bin/uwsgi
Python Version:  3.10.12
Python Path:  [‘.’,
 ‘’,
 ‘/usr/lib/python310.zip’,
 ‘/usr/lib/python3.10’,
 ‘/usr/lib/python3.10/lib-dynload’,
 ‘/opt/openrvdas/venv/lib/python3.10/site-packages’,
 ‘/opt/openrvdas’,
 ‘/opt/openrvdas’]

Error when using command line:

  File "/opt/openrvdas/server/in_memory_server_api.py", line 107, in get_logger_config
    raise ValueError('No logger config "%s" in config' % config_name)
ValueError: No logger config "my_logger->on" in config