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

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)

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 18 (6 by maintainers)

Most upvoted comments

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

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

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

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

@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…

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