Overwrite option doesn't seem to work
After creating an nx from h5 using nxtomomill h52nx xxxxx.h5
two times in a row, the second time it fails to overwrite:
n@slurm-nice-devel3301:~/ID11/test_data/PO_empty_tomo_test_test_01$ nxtomomill h52nx PO_empty_tomo_test_test_01.h5
Overwrite /home/esrf/pautran/ID11/test_data/PO_empty_tomo_test_test_01/PO_empty_tomo_test_test_01.nx ? (Y/n)
Traceback (most recent call last):
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_10_08/bin/nxtomomill", line 8, in <module>
sys.exit(main())
^^^^^^
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_10_08/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_10_08/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_10_08/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_10_08/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_10_08/lib/python3.11/site-packages/nxtomomill/app/h52nx.py", line 382, in main
from_h5_to_nx(
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_10_08/lib/python3.11/site-packages/nxtomomill/converter/hdf5/hdf5converter.py", line 866, in from_h5_to_nx
converter = _H5ToNxConverter(
^^^^^^^^^^^^^^^^^
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_10_08/lib/python3.11/site-packages/nxtomomill/converter/hdf5/hdf5converter.py", line 175, in __init__
self.preprocess()
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_10_08/lib/python3.11/site-packages/nxtomomill/converter/hdf5/hdf5converter.py", line 205, in preprocess
self._check_conversion_is_possible()
File "/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_10_08/lib/python3.11/site-packages/nxtomomill/converter/hdf5/hdf5converter.py", line 767, in _check_conversion_is_possible
raise OSError(f"unable to overwrite {output_file}, exit")
OSError: unable to overwrite /home/esrf/pautran/ID11/test_data/PO_empty_tomo_test_test_01/PO_empty_tomo_test_test_01.nx, exit
(/cvmfs/tomo.esrf.fr/software/packages/linux/x86_64/tomotools/2024_10_08) pautran@slurm-nice-devel3301:~/ID11/test_data/PO_empty_tomo_test_test_01$ ls
PO_empty_tomo_test_test_01_0000.nx PO_empty_tomo_test_test_01_old.nx scan0004
PO_empty_tomo_test_test_01.h5 scan0002 scan0005
PO_empty_tomo_test_test_01.nx scan0003