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

Latest trollflow2 master fails with latest satpy master #96

Closed gerritholl closed 3 years ago

gerritholl commented 3 years ago

Describe the bug

The latest trollflow2 master create_scene plugin fails with the latest satpy master, due to satpy's removal of ppp_config_dir in https://github.com/pytroll/satpy/pull/1501, which causes trollflow2 to fail with TypeError: __init__() got an unexpected keyword argument 'ppp_config_dir'.

To Reproduce

from trollflow2.plugins import create_scene
job = {"input_filenames": "bar", "product_list": {}}
create_scene(job)

Expected behavior

Should probably fail because the input filenames don't exist.

Actual results

Actually fails to create a Scene object in the first place.

Traceback (most recent call last):
  File "mwe003.py", line 3, in <module>
    create_scene(job)
  File "/data/gholl/miniconda3/envs/py38b/lib/python3.8/site-packages/trollflow2/plugins/__init__.py", line 78, in create_scene
    job['scene'] = Scene(filenames=job['input_filenames'], **conf)
TypeError: __init__() got an unexpected keyword argument 'ppp_config_dir'

Or in an actual test production environment:

[DEBUG: 2021-02-03 08:00:22 : Listener] New message received: pytroll://aapp/avhrr file pytroll@oflks333.dwd.de 2021-02-03T08:00:22.896285 v1.01 application/json {"path": "", "platform_name": "Metop-A", "start_time": "2021-02-03T07:43:18", "end_time": "2
021-02-03T07:52:12", "processing_time": "2021-02-03T07:43:19", "sensor": "avhrr/3", "orig_platform_name": "M02", "collection_area_id": "eurol", "filename": "hrpt_metop02_20210203_0743_74150.l1b", "uri": "file://localhost/data/pytroll/TMP/AAPP-processed/metop02_20210203_0743_74150/hrpt_metop02_20210203_0743_74150.l1b", "uid": "hrpt_metop02_20210203_0743_74150.l1b", "orbit_number": 74150, "format": "AAPP", "type": "Binary", "data_processing_level": "1B", "station": "unknown", "env": "test"}
[INFO: 2021-02-03 08:00:22 : trollflow2.launcher] Distributed processing not configured, using default scheduler
[INFO: 2021-02-03 08:00:22 : trollflow2.plugins] Generating scene
[ERROR: 2021-02-03 08:00:22 : trollflow2.launcher] Process crashed
Traceback (most recent call last):
  File "/opt/pytroll/pytroll_inst/miniconda3/envs/pytroll-py38/lib/python3.8/site-packages/trollflow2/launcher.py", line 268, in process
    cwrk.pop('fun')(job, **cwrk)
  File "/opt/pytroll/pytroll_inst/miniconda3/envs/pytroll-py38/lib/python3.8/site-packages/trollflow2/plugins/__init__.py", line 78, in create_scene
    job['scene'] = Scene(filenames=job['input_filenames'], **conf)
TypeError: __init__() got an unexpected keyword argument 'ppp_config_dir'
[DEBUG: 2021-02-03 08:00:22 : trollflow2.launcher] Cleaning up
Process Process-20:
Traceback (most recent call last):
  File "/opt/pytroll/pytroll_inst/miniconda3/envs/pytroll-py38/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/opt/pytroll/pytroll_inst/miniconda3/envs/pytroll-py38/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/pytroll/pytroll_inst/miniconda3/envs/pytroll-py38/lib/python3.8/site-packages/trollflow2/launcher.py", line 268, in process
    cwrk.pop('fun')(job, **cwrk)
  File "/opt/pytroll/pytroll_inst/miniconda3/envs/pytroll-py38/lib/python3.8/site-packages/trollflow2/plugins/__init__.py", line 78, in create_scene
    job['scene'] = Scene(filenames=job['input_filenames'], **conf)
TypeError: __init__() got an unexpected keyword argument 'ppp_config_dir'
[ERROR: 2021-02-03 08:00:22 : trollflow2.launcher] Process crashed with exit code 1

Text output of actual results or error messages including full tracebacks if applicable.

Environment Info:

Additional context

This isn't caught by the test_create_scene unit test, because it mocks the Scene call so fails to notice this keyword argument is not valid.