Spyder: Provide autosave functionality to not lose unsaved code when Spyder crashes

Created on 27 Apr 2017  路  18Comments  路  Source: spyder-ide/spyder

Description

I don't know how to reproduce, but this has happened for the 3rd time in a few weeks:

  1. I launch Spyder through Anaconda 1.4.3
  2. Spyder loads with my usual 3..5 small .py files opened
  3. I start writing and executing code in one of them, using the Editor, IPython console, Variable explorer and Help panes.
  4. Sometimes Spyder crashes. It happens not during code execution or anything, but instead happens when I'm not doing anything. It's just sitting there and boom. And of course all code that I've written after the last execution is lost.

Version and main components

  • Spyder Version: 3.1.2
  • Python Version: 3.6.0
  • Qt Versions: 5.6.2, PyQt5 5.6 on Windows

Dependencies

pyflakes >=0.6.0 :  1.5.0 (OK)
pep8 >=0.6       :  1.7.0 (OK)
pygments >=2.0   :  2.1.3 (OK)
qtconsole >=4.2.0:  4.2.1 (OK)
nbconvert >=4.0  :  4.2.0 (OK)
pandas >=0.13.1  :  0.19.2 (OK)
numpy >=1.7      :  1.11.3 (OK)
sphinx >=0.6.6   :  1.5.1 (OK)
rope >=0.9.4     :  0.9.4-1 (OK)
jedi >=0.8.1     :  0.9.0 (OK)
matplotlib >=1.0 :  2.0.0 (OK)
sympy >=0.7.3    :  1.0 (OK)
pylint >=0.25    :  1.6.4 (OK)

Editor Duplicate Enhancement

Most helpful comment

I had same issue. please implement autosave as a priority feature.

All 18 comments

This happens because Spyder doesn't have autosave functionality. We'll try to add it in a future release.

This is a duplicate of issue #2111.

I had same issue. please implement autosave as a priority feature.

Just lost hours of work because of this error 馃槥 Please make this a priority feature.

Sorry to hear that. We're working on this for Spyder 4.

Is there a way to set the Spyder editor to save files every _n_ minutes? I'm not sure if that's what is proposed above.

same problem, I lost some hours of work yesterday. What about spyder4?

Same, anyway to recover it?

Not for now, but we're working on it for Spyder 4.

Is there really no way to recover a deleted file from File Explorer in Spyder 3.2.6? I lost two days of work...

are you guys serious? No autosave? wtf????

@marketwiz It's coming in Spyder4 as you can see in the message just above your comment, thanks to @jitseniesen who contributed his time freely to implement this.

Nice features need nice people to contribute...

if you go in the folder where you have .spyder-py3 you should find a history.py which contains the last 10k lines or so of your code, this is how i just recovered 3 days worth of work

+1 for autosave
after losing hours of work I have to switch to another ide until autosave is implemented. when it is I'll switch back. thank you to the spyder team for all your work hope to see you again soon!

if you go in the folder where you have .spyder-py3 you should find a history.py which contains the last 10k lines or so of your code, this is how i just recovered 3 days worth of work

where can i find the history.py?

if you go in the folder where you have .spyder-py3 you should find a history.py which contains the last 10k lines or so of your code, this is how i just recovered 3 days worth of work

where can i find the history.py?

For anyone wondering, @shoemaker9 's solution of using the history.py log saved me hours of lost code. Refer to the documentation here on how to access it : https://docs.spyder-ide.org/historylog.html

How is this not already a feature? Why even design an IDE without autosave?

This is already solved in Spyder 4. Please update.

Was this page helpful?
0 / 5 - 0 ratings