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
This function operates exactly as TemporaryFile() does, except that the file is guaranteed to have a visible name in the file system (on Unix, the directory entry is not unlinked). That name can be retrieved from the name attribute of the returned file-like object. Whether the name can be used to open the file a second time, while the named temporary file is still open, varies across platforms (it can be so used on Unix; it cannot on Windows). If delete is true (the default), the file is deleted as soon as it is closed. The returned object is always a file-like object whose file attribute is the underlying true file object. This file-like object can be used in a with statement, just like a normal file.
One way to fix this is by closing the temporary file inside the while loop:
The text was updated successfully, but these errors were encountered:
jakeb1996
changed the title
[Windows] Opened temporary file cannot be moved
[Windows] Extract off-targets: opened temporary file cannot be moved
Jun 21, 2023
When running the extract off-targets script on Windows, an OS error may be thrown when trying to move the temporary file.
The temporary file is never closed and therefore, Windows does not want to move it.
The error occurs here:
Crackling/src/crackling/utils/extractOfftargets.py
Line 191 in bb50af9
According to the Python docs, here, this behavior is expected:
One way to fix this is by closing the temporary file inside the while loop:
Crackling/src/crackling/utils/extractOfftargets.py
Lines 161 to 191 in bb50af9
The text was updated successfully, but these errors were encountered: