edf2nx: add error message
If the dataset does not contain any .info file then we might end up with a not helpful error / message from HDF5 like:
gpu4a100-37:gustavo/ME1668/cc_satph9_25nm_ % nxtomomill edf2nx --dataset-basename cc_satph9_25nm /data/id16b/inhouse3/gustavo/ME1668/cc_satph9_25nm_/ /data/id16b/inhouse3/gustavo/ME1668/HT_Results/myFileNx.nx
preprocessing - retrieve all metadata (can take a few seconds - cannot display real advancement): [##########----------] 50.0%WARNING:nxtomomill.converter.edf.edfconverter:Unable to find machine current default current. Take 0.0
Traceback (most recent call last):
File "h5py/utils.pyx", line 105, in h5py.utils.convert_tuple
TypeError: an integer is required
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_04_22/bin/nxtomomill", line 8, in <module>
sys.exit(main())
^^^^^^
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_04_22/lib/python3.11/site-packages/nxtomomill/__main__.py", line 252, in main
status = launcher.execute(sys.argv)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_04_22/lib/python3.11/site-packages/nxtomomill/__main__.py", line 116, in execute
super().execute(argv=argv)
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_04_22/lib/python3.11/site-packages/silx/utils/launcher.py", line 291, in execute
return command.execute(command_argv)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_04_22/lib/python3.11/site-packages/silx/utils/launcher.py", line 128, in execute
status = func(argv)
^^^^^^^^^^
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_04_22/lib/python3.11/site-packages/nxtomomill/app/edf2nx.py", line 143, in main
converter.from_edf_to_nx(
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_04_22/lib/python3.11/site-packages/nxtomomill/converter/edf/edfconverter.py", line 213, in from_edf_to_nx
return __process(
^^^^^^^^^^
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_04_22/lib/python3.11/site-packages/nxtomomill/converter/edf/edfconverter.py", line 398, in __process
data_dataset = output_grp.create_dataset(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_04_22/lib/python3.11/site-packages/h5py/_hl/group.py", line 183, in create_dataset
dsid = dataset.make_new_dset(group, shape, dtype, data, name, **kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_04_22/lib/python3.11/site-packages/h5py/_hl/dataset.py", line 161, in make_new_dset
sid = h5s.create_simple(shape, maxshape)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5s.pyx", line 96, in h5py.h5s.create_simple
File "h5py/utils.pyx", line 107, in h5py.utils.convert_tuple
TypeError: Can't convert element 1 (None) to hsize_t