Jun-27-2022, 12:49 PM
Hi all! My program writes to three .csv files. At the end of the program, I do a filename.close() for all three. Usually, this does the trick and after the program executes I'm able to open these files in Excel and look at them.
Intermittently, I get the "file is locked for editing by 'another user.' Open 'Read-Only' or click 'Notify' to open read-only and receive notification when the document is no longer in use."
Now... the first few times this happened would be when an exception was raised and the program stopped. In these cases, I'm able to manually enter filename.close() in JN and the file opens fine.
With this intermittent issue, though, it's not following any exception and manually entering filename.close() in JN does not unlock the file. Twice now, it seems, the file is unlocked not when I close the two JN browser tabs but rather when I close Anaconda Powershell Prompt, which is always running in the background when I'm using JN.
Any ideas on what I can do to avoid this?
Intermittently, I get the "file is locked for editing by 'another user.' Open 'Read-Only' or click 'Notify' to open read-only and receive notification when the document is no longer in use."
Now... the first few times this happened would be when an exception was raised and the program stopped. In these cases, I'm able to manually enter filename.close() in JN and the file opens fine.
With this intermittent issue, though, it's not following any exception and manually entering filename.close() in JN does not unlock the file. Twice now, it seems, the file is unlocked not when I close the two JN browser tabs but rather when I close Anaconda Powershell Prompt, which is always running in the background when I'm using JN.
Any ideas on what I can do to avoid this?