ZELLMECHANIK-DRESDEN / ShapeOut2

graphical user interface for analysis and visualization of RT-DC data sets
https://shapeout2.readthedocs.io
GNU General Public License v3.0
8 stars 6 forks source link

PermissionError when trying to access a dataset that has been accessed before #152

Open paulmueller opened 11 months ago

paulmueller commented 11 months ago

This could just be a race condition with another process opening the file in write-mode.

But it might be something internal. Check whether the way the file is openend implies that it really has been opened before. If yes, then there is a problem with HDF5 file locking in Shape-Out/dclab.

"Nach datenexport habe ich nur den filter gewechselt da kam der Fehler:"


Unhandled exception in Shape-Out version 2.14.0:
Traceback (most recent call last):
  File "shapeout2\gui\widgets\wait_cursor.py", line 31, in wrapper
    ret = func(*args, **kwargs)
  File "shapeout2\gui\main.py", line 972, in on_quickview_show_dataset
    self.widget_quick_view.show_rtdc(ds, slot)
  File "shapeout2\gui\widgets\wait_cursor.py", line 31, in wrapper
    ret = func(*args, **kwargs)
  File "shapeout2\gui\quick_view\qv_main.py", line 740, in show_rtdc
    self.show_event(0)
  File "shapeout2\gui\widgets\wait_cursor.py", line 31, in wrapper
    ret = func(*args, **kwargs)
  File "shapeout2\gui\quick_view\qv_main.py", line 610, in show_event
    cellimg, imkw = self.get_event_image(ds, event)
  File "shapeout2\gui\quick_view\qv_main.py", line 256, in get_event_image
    cellimg = ds["image"][event]
  File "dclab\rtdc_dataset\fmt_hierarchy.py", line 49, in __getitem__
  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\_hl\dataset.py", line 758, in __getitem__
  File "h5py\_selector.pyx", line 376, in h5py._selector.Reader.read
PermissionError: [Errno 13] Can't synchronously read data (file read failed: time = Thu Nov 16 13:45:55 2023
, filename = '[...]M001_data_dce.rtdc', file descriptor = 3, errno = 13, error message = 'Permission denied', buf = 000001EDA58A4010, total read size = 628674, bytes this sub-read = 628674, bytes actually read = 18446744073709551615, offset = 232698)
paulmueller commented 7 months ago

As mentioned in #153, one reason for this to happen could be that the user loaded an exported dataset and then exported to the same directory, overriding the dataset that was loaded before in Shape-Out. If so, then this would be fixed in Shape-Out 2.15.4