pytroll / pytroll-aapp-runner

Pytroll runner for AAPP
http://pytroll-aapp-runner.readthedocs.io/en/develop/
GNU General Public License v3.0
1 stars 8 forks source link

Passing a log-config file fails with AttributeError #23

Open gerritholl opened 3 years ago

gerritholl commented 3 years ago

Code Sample, a minimal, complete, and verifiable piece of code

aapp_dr_runner.py -v -c aapp-processing.yaml -n localhost -e test --log-config logging.yaml

Problem description

Starting the runner passing a logfile with --log-config fails with AttributeError: module 'logging' has no attribute 'config'.

Expected Output

I expect that aapp-runner applies the desired config.

Actual Result, Traceback if applicable

$ aapp_dr_runner.py -v -c aapp-processing.yaml -n localhost -e test --log-config logging.yaml
Warning: given station: unknown not in supported_stations list.
Variable tle_download is not recognised as a mandatory nor optional config variable.This will not be used in the processing.
Checking directories...
Traceback (most recent call last):
  File "/opt/pytroll/pytroll_inst/miniconda3/envs/pytroll-py39/bin/aapp_dr_runner.py", line 1057, in <module>
    setup_logging_from_config(log_config)
  File "/opt/pytroll/pytroll_inst/miniconda3/envs/pytroll-py39/bin/aapp_dr_runner.py", line 391, in setup_logging_from_config
    logging.config.dictConfig(log_dict)
AttributeError: module 'logging' has no attribute 'config'

Versions of Python, package at hand and relevant dependencies

Python 3.9.2, aapp-runner latest main branch.