better understanding why station is removed in preprocessing
Add a more detailed error message why a station is removed inpreprocessing.py
.
def f_proc(data_handler, station, name_affix, store, **kwargs):
"""
Try to create a data handler for given arguments. If build fails, this station does not fulfil all requirements and
therefore f_proc will return None as indication. On a successfull build, f_proc returns the built data handler and
the station that was used. This function must be implemented globally to work together with multiprocessing.
"""
try:
res = data_handler.build(station, name_affix=name_affix, store_processed_data=store, **kwargs)
except (AttributeError, EmptyQueryResult, KeyError, requests.ConnectionError, ValueError) as e:
formatted_lines = traceback.format_exc().splitlines()
logging.info(f"remove station {station} because it raised an error: {e} (from {' | '.join(formatted_lines[-3:])}")
res = None
return res, station