Data viewer - handle concurency
when several data viewer are in // we can end up with some errors like:
Traceback (most recent call last):
File "/nobackup/lbs191tmp1/tomwer/dev/orange3venv/lib/python3.7/site-packages/Orange/canvas/scheme/widgetsscheme.py", line 1074, in process_signals_for_widget
handler(*args)
File "/nobackup/lbs191tmp1/tomwer/dev/tomwer/orangecontrib/tomwer/widgets/control/DataValidatorOW.py", line 132, in addScan
self._widget.addScan(scan)
File "/nobackup/lbs191tmp1/tomwer/dev/tomwer/tomwer/gui/control/datavalidator.py", line 143, in addScan
self.setActiveScan(scan)
File "/nobackup/lbs191tmp1/tomwer/dev/tomwer/tomwer/gui/control/datavalidator.py", line 157, in setActiveScan
self._centralWidget.setScan(scan)
File "/nobackup/lbs191tmp1/tomwer/dev/tomwer/tomwer/gui/visualization/dataviewer.py", line 138, in setScan
self._updateDisplay()
File "/nobackup/lbs191tmp1/tomwer/dev/tomwer/tomwer/gui/visualization/dataviewer.py", line 206, in _updateDisplay
slices = self._scan().get_reconstructions_urls()
File "/nobackup/lbs191tmp1/tomwer/dev/tomwer/tomwer/core/scan/scanbase.py", line 581, in get_reconstructions_urls
results.extend(get_recons_url_from_folder(self.path))
File "/nobackup/lbs191tmp1/tomwer/dev/tomwer/tomwer/core/scan/scanbase.py", line 563, in get_recons_url_from_folder
with HDF5File(full_file_path, "r", swmr=True) as h5f:
File "/nobackup/lbs191tmp1/tomwer/dev/tomoscan/tomoscan/io.py", line 78, in __init__
super().__init__(filename, mode=mode, swmr=swmr, **kwargs)
File "/nobackup/lbs191tmp1/tomwer/dev/orange3venv/lib/python3.7/site-packages/h5py/_hl/files.py", line 427, in __init__
swmr=swmr)
File "/nobackup/lbs191tmp1/tomwer/dev/orange3venv/lib/python3.7/site-packages/h5py/_hl/files.py", line 190, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
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/h5f.pyx", line 96, in h5py.h5f.open
OSError: Unable to open file (SWMR read access flag not the same for file that is already open)
We should try to open them n time otherwise add a log