DirectoryPath types in config are incompatible with Obspy MassDownloader
[2023-07-25 17:17:19,223: ERROR/ForkPoolWorker-7] Task waveqc.tasks.download_mseeds[5f9c7172-f370-4704-8801-a7fa817c510f] raised unexpected: TypeError("argument of type 'PosixPath' is not iterable")
Traceback (most recent call last):
File "/home/panaysi/Projects/isterre/waveqc/venv/wave_qc-RaIltitd-py3.11/lib/python3.11/site-packages/celery/app/trace.py", line 477, in trace_task
R = retval = fun(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/home/panaysi/Projects/isterre/waveqc/venv/wave_qc-RaIltitd-py3.11/lib/python3.11/site-packages/celery/app/trace.py", line 760, in __protected_call__
return self.run(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/panaysi/Projects/isterre/waveqc/waveqc/tasks.py", line 104, in download_mseeds
mdl.download(
File "/home/panaysi/Projects/isterre/waveqc/venv/wave_qc-RaIltitd-py3.11/lib/python3.11/site-packages/obspy/clients/fdsn/mass_downloader/mass_downloader.py", line 207, in download
helper.prepare_mseed_download()
File "/home/panaysi/Projects/isterre/waveqc/venv/wave_qc-RaIltitd-py3.11/lib/python3.11/site-packages/obspy/clients/fdsn/mass_downloader/download_helpers.py", line 523, in prepare_mseed_download
station.prepare_mseed_download(mseed_storage=self.mseed_storage)
File "/home/panaysi/Projects/isterre/waveqc/venv/wave_qc-RaIltitd-py3.11/lib/python3.11/site-packages/obspy/clients/fdsn/mass_downloader/download_helpers.py", line 339, in prepare_mseed_download
interval.filename = utils.get_mseed_filename(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/panaysi/Projects/isterre/waveqc/venv/wave_qc-RaIltitd-py3.11/lib/python3.11/site-packages/obspy/clients/fdsn/mass_downloader/utils.py", line 530, in get_mseed_filename
elif ("{network}" in str_or_fct) and ("{station}" in str_or_fct) and \
^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'PosixPath' is not iterable
The solution is probably transforming STATIONXML_STORAGE_PATH and MSEED_STORAGE_PATH in strings before passing them to obspy
Edited by Simon Panay