You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When converting MDIO to SEG-Y using mdio_to_segy(), the process fails with a UnicodeEncodeError if the EBCDIC header contains non-ASCII characters.
Traceback
Traceback (most recent call last):
File "/home/dask/multidimio-trace-selector/client.py", line 593, in <module>
status, message, flag_data = main()
File "/home/dask/multidimio-trace-selector/client.py", line 482, in main
max_cpu_mdio_to_sgy, mem_usage_mdio_to_sgy, cut_segy_file_size = create_segy(code_runtime_logger, MDIO_FILE, SEGY_DESTINATION, TEMP_DESTINATION, client, cut_mask)
File "/home/dask/multidimio-trace-selector/client.py", line 95, in create_segy
mdio_to_segy(
File "/usr/local/lib/python3.10/site-packages/mdio/converters/mdio.py", line 121, in mdio_to_segy
mdio, segy_factory = feature.result()
File "/usr/local/lib/python3.10/site-packages/distributed/client.py", line 401, in result
return self.client.sync(self._result, callback_timeout=timeout)
File "/usr/local/lib/python3.10/site-packages/mdio/segy/creation.py", line 97, in mdio_spec_to_segy
text_bytes = factory.create_textual_header(text_str)
File "/usr/local/lib/python3.10/site-packages/segy/factory.py", line 140, in create_textual_header
return text_spec.encode(text)
File "/usr/local/lib/python3.10/site-packages/segy/schema/text_header.py", line 98, in encode
return self.processor.encode(string)
File "/usr/local/lib/python3.10/site-packages/segy/schema/text_header.py", line 42, in encode
buffer = text.encode("ascii")
UnicodeEncodeError: 'ascii' codec can't encode character '\u2013' in position 426: ordinal not in range(128)
Sample File
A reproducible sample segy file: gs://tgs-geophysical-test-samples/AP_Data/900_General/WeirdCharinEBCDIC.sgy
Issue
When converting MDIO to SEG-Y using
mdio_to_segy()
, the process fails with aUnicodeEncodeError
if the EBCDIC header contains non-ASCII characters.Traceback
Sample File
A reproducible sample segy file:
gs://tgs-geophysical-test-samples/AP_Data/900_General/WeirdCharinEBCDIC.sgy
Ingestion Params.
The text was updated successfully, but these errors were encountered: