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

Exporting data from an already exported dataset causes problems if the file name was not changed #153

Closed
B-Hartmann opened this issue Nov 24, 2023 · 2 comments

Comments

@B-Hartmann
Copy link
Contributor

Shape-Out 2.14.1
Windows 10

I exported a dataset into a folder. I didn't change the name of the resulting file. Then I loaded that dataset again and applied another filter. I tried to export the filtered data into the same location, getting a PermissionError. It seems that Shape-Out always tries to name the new file SO2-export_0_+sample name+.rtdc and if that file already exists, it cannot create a new file or override the old one because that file is processed in Shape-Out.

Unhandled exception in Shape-Out version 2.14.1:
Traceback (most recent call last):
  File "shapeout2\gui\export\e2data.py", line 46, in done
    self.export_data()
  File "shapeout2\gui\widgets\wait_cursor.py", line 31, in wrapper
    ret = func(*args, **kwargs)
  File "shapeout2\gui\export\e2data.py", line 89, in export_data
    ds.export.hdf5(
  File "dclab\rtdc_dataset\export.py", line 227, in hdf5
  File "pathlib.py", line 1206, in unlink
PermissionError: [WinError 32] Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird: 'C:\\Users\\bhartma\\Desktop\\SO2-export_0_SampleName.rtdc'

Suggestion:
Make Shape-Out check if the destination folder already contains a .rtdc file which starts with SO2-export_0_ and increase the number at the end of this string (1, 2, ...). That would also help to prevent accidentally overriding a previously exported file. Right now, when I export data filtered with one filter, then deactivate that filter and activate a second filter and export the dataset again into the same location, the file that was exported first gets overridden.

@B-Hartmann
Copy link
Contributor Author

B-Hartmann commented Nov 24, 2023

This is at least true for datasets from the same sample folder (and hence the same sample name in the metadata section).

@B-Hartmann
Copy link
Contributor Author

Maybe a starting point for #152 or #137 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant