-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Atomic writes generate temp files in Dropbox #13041
Comments
A new auto-save file pops up immediately after running any unsaved script with runcell (ctrl + enter). By unchecking "save all files before running script" in the preferences, no new auto-save files are created at the time of running the cell. HOWEVER, new auto-save files are created in "usr/pyscript/" immediately when I manually save the changes to "example.py". |
Hi @rqli9, Can you please send us a gif or screenshots of the behavior that you are having right now? |
Hi @steff456 I attached the screenshot of the auto-save files, which are variations of the versions of the highlighted ".py" file that I was actively working on and saved in the same folder. The "auto-save" feature was unselected before all these files were created. It seems to me that these files are the auto-saves for recovery purposes created by spyder. |
Spyder autosaves files in the configuration directory, so those files were not created by the program. Can you please delete all the temp files in the directory and verify if they are created once you open the As well I can see in your screenshot that you are using Dropbox, so maybe that is the cause of all those temp files. |
Hello @steff456, (1) I have manually checked all of these files. They contain incremental versions of NLTK_exercise.py (2) After deleting all of the existing files, new files are added to the directory once I begin editing and running code in NLTK_exercise.py. (3) I have been using Spyder3 in the same directory for an extended amount of time without issue. This problem disappears after reverting back to a Spyder3 installation and opening the NLTK_exercise.py file in the same directory. After going back to Spyder4, the problem appears again. |
It seems there's a conflict with the combination of the auto-save function with dropbox. For now, please work with your files outside dropbox while we work on fixing this. Thanks for reporting! @dalthviz can you please take a look on this one? |
Thank you for working on this issue. I hope it will get fixed soon. |
@dalthviz, I think this is related to the way we perform atomic writes and how Dropbox saves (somehow) those temporary files we use in the background. |
I do confirm I have this annoying issue as well, are there any ways of preventing these files from being saved (I cannot avoid working in dropbox)? |
Hey @DominiqueMakowski, there are no ways to avoid this problem right now, sorry. |
I'm still affected by this issue, is this already being worked on? I think this could be circumvented by not storing the tempfiles in the same directory (as long as it's on the same partition, this should be fine, right?), but in the tempfolder? or is there a reason why this is not done? |
Hi @skjerns I think the idea you have is the right one 👍 In fact, I think is possible to change the dir where spyder/spyder/utils/encoding.py Lines 267 to 268 in 187c56a
I haven had time to work on a fix for this but maybe you want to try to implement the fix @skjerns ? Let us know :) |
Good thinking @dalthviz! However, I would say that we should do that only if the directory you're trying to save to contains |
sure! I'll try that :) And I'll also test it with other clients, such as NextCloud or OneDrive, as I would suspect that they could produce problems as well, however, as they are not so wide-spread it might not have been reported yet. |
Thanks @skjerns ! |
Great! Thanks for your help @skjerns! |
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
Problem Description
Spyder4 changes the auto-save recovery file location to the last directory a script was opened from or saved to. Un-selecting the auto-save feature and restarting Spyder does not disable the auto-save file creation.
What steps reproduce the problem?
What is the expected output? What do you see instead?
The autosave feature can be disabled correctly, or the autosave file to be saved in a specified directory.
Versions
The text was updated successfully, but these errors were encountered: