Fix bug instruments/readers/g5505_text_reader.py. The fallback format does not contain desired_format key, leading to a key error

This commit is contained in:
2025-06-25 16:54:03 +02:00
parent 6c908e6686
commit eb853ee948

View File

@ -61,7 +61,7 @@ def read_txt_files_as_dict(filename: str, instruments_dir: str = None, work_with
file_encoding = fmt_dict['file_encoding']
timestamp_variables = fmt_dict.get('timestamp', [])
datetime_format = fmt_dict.get('datetime_format', None)
desired_datetime_fmt = fmt_dict['desired_datetime_format']
desired_datetime_fmt = fmt_dict.get('desired_datetime_format', None)
# Ensure separator is valid
if not isinstance(separator, str) or not separator.strip():