SyntaxError when evaluating ast of autosave file
See original GitHub issueIssue Report Checklist
- Searched the issues page for similar reports
- Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
- Reproduced the issue after updating with
conda update spyder
(orpip
, if not using Anaconda) - Could not reproduce inside
jupyter qtconsole
(if console-related) - Tried basic troubleshooting (if a bug/error)
- Restarted Spyder
- Reset preferences with
spyder --reset
- Reinstalled the latest version of Anaconda
- Tried the other applicable steps from the Troubleshooting Guide
- Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
What steps reproduce the problem?
What is the expected output? What do you see instead?
Paste Traceback/Error Below (if applicable)
Traceback (most recent call last):
File "C:\Users\MisterOIlz\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3718, in main
mainwindow = run_spyder(app, options, args)
File "C:\Users\MisterOIlz\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3559, in run_spyder
main.setup()
File "C:\Users\MisterOIlz\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 955, in setup
self.editor = Editor(self)
File "C:\Users\MisterOIlz\Anaconda3\lib\site-packages\spyder\plugins\editor\plugin.py", line 178, in __init__
self.autosave.try_recover_from_autosave()
File "C:\Users\MisterOIlz\Anaconda3\lib\site-packages\spyder\plugins\editor\utils\autosave.py", line 176, in try_recover_from_autosave
files_to_recover, pidfiles = self.get_files_to_recover()
File "C:\Users\MisterOIlz\Anaconda3\lib\site-packages\spyder\plugins\editor\utils\autosave.py", line 149, in get_files_to_recover
txt_as_dict = ast.literal_eval(txt)
File "C:\Users\MisterOIlz\Anaconda3\lib\ast.py", line 46, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
File "C:\Users\MisterOIlz\Anaconda3\lib\ast.py", line 35, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 0
^
SyntaxError: unexpected EOF while parsing
[13252:12040:0208/170603.661:ERROR:broker_win.cc(59)] Error reading broker pipe: The pipe has been ended. (0x6D)
Versions
- Spyder version: 4.0.1
- Python version: 3.7.6
- Qt version: 5.9.7
- PyQt version: 5.9.2
- Operating System name/version: Window 10
Dependencies
PASTE DEPENDENCIES HERE
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
python ast SyntaxError: invalid syntax for unknown reason
You're getting a syntax error because the string/json includes double quotes, which end the declaration of the string prematurely.
Read more >[ESS] Failure to parse long R functions when ess-eval-visibly nil
A workaround for this is to load the file with C-c C-l. That is, keep all you functions in a *remote* file and...
Read more >Blank Screen in Edit/New Post/Page After Updating to 5.8
After updating WP to version 5.8 it shows blank screen on “edit post/page” and “new post/page”/ I installed “WP Downgrade' plugin and downgraded...
Read more >What IT administrators should know about AutoSave
AutoSave is enabled when a file is stored on OneDrive, OneDrive for work or school, or SharePoint in Microsoft 365.
Read more >Known Issues - Tableau
An unexpected error would occur stating "Uncaught Error: Syntax error, unrecognized expression" when using " " in the data source name. Fixed in:...
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 Free
Top 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
@jitseniesen @ccordoba12 Thank you so much. I can open Spyder when I deleted pidxxxx.txt file.
You were right @jitseniesen.