pytroll / trollflow2

Next generation Trollflow. Trollflow is for batch-processing satellite data using Satpy
https://trollflow2.readthedocs.org/
GNU General Public License v3.0
10 stars 15 forks source link

trollflow2 fails to launch with pyyaml 6.0 #121

Closed gerritholl closed 3 years ago

gerritholl commented 3 years ago

Describe the bug

With pyyaml 6.0, released 2021-10-13, trollflow2 satpy_launcher.py fails with TypeError if passed a logging configuration file.

To Reproduce

mamba create -n test python=3.9 pyyaml=6.0
conda activate test
pip install ~/checkouts/trollflow2
mamba install rasterio
satpy_launcher.py -n localhost ~/checkouts/pytroll-dwd-config/polar-avhrr/trollflow2.yaml -c ~/checkouts/pytroll-dwd-config/polar-avhrr/logging.yaml

Expected behavior

I expect that trollflow2 launches successfully.

Actual results

The satpy_launcher fails to start and crashes out with a TypeError:

Traceback (most recent call last):
  File "/data/gholl/mambaforge/envs/test/bin/satpy_launcher.py", line 79, in <module>
    main()
  File "/data/gholl/mambaforge/envs/test/bin/satpy_launcher.py", line 65, in main
    log_dict = yaml.load(fd.read())
TypeError: load() missing 1 required positional argument: 'Loader'

Environment Info:

Additional context

It had been deprecated for a long time to call yaml.load(...) without passing a loader. Since pyyaml 6.0, this is no longer supported. See https://github.com/yaml/pyyaml/pull/561.