You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
Workspace save-as should always save the current workspace into a new directory. If the original workspace is a scratch workspace (i.e. a new workspace). The scratch directory hall be removed.
Actual behavior
On Windows 10, the scratch directory is sometimes in use by another process, hence the OS denies accessing it. We get a PermissionError in Python when trying to delete it:
Job: Save workspace as "C:\Users\Norman\Cate-Workspaces/scatter"
Message: [WinError 32] Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird: 'C:\\Users\\Norman\\.cate\\scratch\\74380265-536b-476d-8dc8-b7c28eb309a7'
Code: -32001
Method: save_workspace_as
Exception: PermissionError
Traceback (most recent call last):
File "C:\Users\Norman\IdeaProjects\ccitools\cate\cate\util\web\jsonrpchandler.py", line 209, in send_service_method_result
result = future.result()
File "C:\Users\Norman\Miniconda3\envs\cate-env\lib\concurrent\futures\_base.py", line 425, in result
return self.__get_result()
File "C:\Users\Norman\Miniconda3\envs\cate-env\lib\concurrent\futures\_base.py", line 384, in __get_result
raise self._exception
File "C:\Users\Norman\Miniconda3\envs\cate-env\lib\concurrent\futures\thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\Users\Norman\IdeaProjects\ccitools\cate\cate\util\web\jsonrpchandler.py", line 306, in call_service_method
result = method(*method_params, monitor=monitor)
File "C:\Users\Norman\IdeaProjects\ccitools\cate\cate\webapi\websocket.py", line 258, in save_workspace_as
workspace = self.workspace_manager.save_workspace_as(base_dir, to_dir, monitor=monitor)
File "C:\Users\Norman\IdeaProjects\ccitools\cate\cate\core\wsmanag.py", line 255, in save_workspace_as
shutil.rmtree(base_dir)
File "C:\Users\Norman\Miniconda3\envs\cate-env\lib\shutil.py", line 494, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Users\Norman\Miniconda3\envs\cate-env\lib\shutil.py", line 393, in _rmtree_unsafe
onerror(os.rmdir, path, sys.exc_info())
File "C:\Users\Norman\Miniconda3\envs\cate-env\lib\shutil.py", line 391, in _rmtree_unsafe
os.rmdir(path)
PermissionError: [WinError 32] Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird: 'C:\\Users\\Norman\\.cate\\scratch\\74380265-536b-476d-8dc8-b7c28eb309a7'
Steps to reproduce the problem
Create new workspace
Add some operation steps
Save As
Specifications
Cate 2.0.0.dev18, Windows 10
The text was updated successfully, but these errors were encountered:
Quick fix is to catch and ignore the error as the new workspace is saved-as without problems.
However, we must clean up scratch workspaces from time to time when Cate starts.
Expected behavior
Workspace save-as should always save the current workspace into a new directory. If the original workspace is a scratch workspace (i.e. a new workspace). The scratch directory hall be removed.
Actual behavior
On Windows 10, the scratch directory is sometimes in use by another process, hence the OS denies accessing it. We get a
PermissionError
in Python when trying to delete it:Steps to reproduce the problem
Specifications
Cate 2.0.0.dev18, Windows 10
The text was updated successfully, but these errors were encountered: