Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
paulmueller opened this issue Nov 20, 2023 · 1 comment
Labels
bug Something isn't working difficult to reproduce

Comments

@paulmueller
Copy link
Member

paulmueller commented Nov 20, 2023

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
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working difficult to reproduce
Projects
None yet
Development

No branches or pull requests

1 participant