KeyError when autosaving file
See original GitHub issueDescription
What steps will reproduce the problem?
It’s happened whole I guess it tried to save changes to the file.
Traceback
File "/home/ravi/Anaconda/lib/python3.7/site-packages/spyder/plugins/editor/utils/autosave.py", line 122, in do_autosave
stack.autosave.autosave_all()
File "/home/ravi/Anaconda/lib/python3.7/site-packages/spyder/plugins/editor/utils/autosave.py", line 305, in autosave_all
self.maybe_autosave(index)
File "/home/ravi/Anaconda/lib/python3.7/site-packages/spyder/plugins/editor/utils/autosave.py", line 265, in maybe_autosave
orig_hash = self.file_hashes[orig_filename]
KeyError: '/home/ravi/Documents/fj/tictac.py'
WARNING:spyder.widgets.github.backend:Failed to send bug report on Github. response={'code': 401, 'json': {'message': 'Bad credentials', 'documentation_url': 'https://developer.github.com/v3'}}
WARNING:spyder.widgets.github.backend:Failed to send bug report on Github. response={'code': 401, 'json': {'message': 'Bad credentials', 'documentation_url': 'https://developer.github.com/v3'}}
Versions
- Spyder version: 4.0.0b4
- Python version: 3.7.3
- Qt version: 5.12.4
- PyQt5 version: 5.12.3
- Operating System: Linux 5.2.4-1-MANJARO
Dependencies
pygments >=2.0 : 2.4.2 (OK)
qdarkstyle >=2.6.4: 2.7 (OK)
sphinx >=0.6.6 : 2.1.2 (OK)
psutil >=0.3 : 5.6.3 (OK)
pyls >=0.27.0 : 0.28.0 (OK)
nbconvert >=4.0 : 5.5.0 (OK)
pandas >=0.13.1 : 0.24.2 (OK)
numpy >=1.7 : 1.16.4 (OK)
sympy >=0.7.3 : 1.4 (OK)
cython >=0.21 : 0.29.12 (OK)
qtconsole >=4.5.2 : 4.5.2 (OK)
IPython >=4.0 : 7.6.1 (OK)
matplotlib >=2.0.0: 3.1.0 (OK)
pylint >=0.25 : 2.3.1 (OK)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Python KeyError During Save/Load - Stack Overflow
In your error: KeyError: b'flipvariables' means the key flipvariables does not exist for the given dictionary. Based on the line flipvariables ...
Read more >RoboFont Forum UFO not saving all changes
Occasionally I've been able to salvage the changes glyphs from auto saved files but it's really frustrating and hard to keep track of....
Read more >AutoSave error - Microsoft Community
I have recently installed Office 365 on my desktop. Now, when I download a Word document and try to 'save as' to the...
Read more >Full Text Bug Listing - Red Hat Bugzilla
Description of problem: I thought I'd create a customized material profile. So I hit Ctrl+K (Settings > Extruder 1 > Material > Manage ......
Read more >Python KeyError Exceptions and How to Handle Them
The program fails when you give a key that is not in the dictionary. Here, the traceback's last few lines point to the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, but only in the internal file explorer.
I found one possible cause: if you rename a file in the file explorer, then it is automatically renamed in the editor, but the autosave information is not updated. This leads to the KeyError exception posted.
@DeadVampire Do you remember by any chance whether you renamed the file?