Problem with old corrupted data (from 2017 at 29-ID). Need a try except to cash the exception and print the name of the corrupted file.
No MDA files found in the selected folder.
Traceback (most recent call last):
File "/home/beams3/RODOLAKIS/src/mdaviz/mdaviz/mainwindow.py", line 181, in onFolderSelected
mda_list = [utils.get_file_info(f) for f in folder_path.glob("*.mda")]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/beams3/RODOLAKIS/src/mdaviz/mdaviz/mainwindow.py", line 181, in <listcomp>
mda_list = [utils.get_file_info(f) for f in folder_path.glob("*.mda")]
^^^^^^^^^^^^^^^^^^^^^^
File "/home/beams3/RODOLAKIS/src/mdaviz/mdaviz/utils.py", line 74, in get_file_info
file_data = readMDA(str(file_path))[1]
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/beams3/RODOLAKIS/src/mdaviz/mdaviz/synApps_mdalib/mda.py", line 790, in readMDA
n = u.unpack_int() # length of name string
^^^^^^^^^^^^^^
File "/home/beams/RODOLAKIS/.conda/envs/mdaviz/lib/python3.11/xdrlib.py", line 171, in unpack_int
raise EOFError
EOFError
Aborted (core dumped)
Problem with old corrupted data (from 2017 at 29-ID). Need a
try except
to cash the exception and print the name of the corrupted file.