Reputation: 437
This command failed to be executed because an error occurred while trying to get the file code from Spyder's editor. The error was:
An exception has occurred, use %tb to see the full traceback.
TypeError: handle_get_file_code() got an unexpected keyword argument 'save_all'
Upvotes: 28
Views: 15899
Reputation: 15611
Before attempting any uninstall, I tried
> conda install spyder=4.1.5
These were the associated changes
The following packages will be UPDATED:
jedi 0.14.1-py37_0 --> 0.17.1-py37_0
python-language-s~ pkgs/main/win-64::python-language-ser~ --> pkgs/main/noarch::python-language-server-0.35.1-py_0
spyder 4.0.0-py37_0 --> 4.1.5-py37_0
The following packages will be DOWNGRADED:
autopep8 1.5.7-pyhd3eb1b0_0 --> 1.5.6-pyhd3eb1b0_0
flake8 3.9.2-pyhd3eb1b0_0 --> 3.9.0-pyhd3eb1b0_0
parso 0.8.2-pyhd3eb1b0_0 --> 0.7.0-py_0
pycodestyle 2.7.0-pyhd3eb1b0_0 --> 2.6.0-pyhd3eb1b0_0
pyflakes 2.3.1-pyhd3eb1b0_0 --> 2.2.0-pyhd3eb1b0_0
spyder-kernels 1.10.2-py37haa95532_0 --> 1.9.4-py37_0
Note especially the downgrade of spyder-kernels
to 1.9.4
.
That is likely the reason why
> conda install spyder-kernels=1.9.4
also seems to work.
Note: It is still somewhat puzzling to me that an update of a package leads to a downgrade of another. Not that I don't understand from the programming/technical point of view how that can happen, but I wouldn't expect it to happen (and as often as it does).
Upvotes: 1
Reputation: 267
I ran into the same issue. Instead on uninstalling and reintsalling, open the anaconda prompt and run
conda install spyder=4.1.5
Close and reopen the spyder application. Your algorithm will work seemlessly.
Upvotes: 4
Reputation: 21
It's bugs of Spyder 4.14, Upgrading to V4.15 ,Then getrid of your problem
Upvotes: 2
Reputation: 428
UPDATE: When following this answer's advice, I first did conda update conda
followed by conda update --all
as advised in this answer. The following is a partial list of what conda env export
returns on my Windows 10 conda (Python 3.7) environment which currently does not have this issue:
- spyder=4.1.5=py37_0
- spyder-kernels=1.9.4=py37_0
Upvotes: 0
Reputation: 5578
The following upgrade solved the problem for me:
conda install spyder=4.1.5
I found the solution at the bottom of this thread.
Upvotes: 2
Reputation: 293
I had the same issue. Following what is discussed here: https://github.com/spyder-ide/spyder/issues/13715, I just ran the command:
conda install spyder-kernels=1.9.3
and it worked !
Upvotes: 0
Reputation: 2814
The problem seems to come from the new version of the sub-package spyder-kernels
I've uninstalled the version 1.9.4
conda uninstall spyder-kernels
And came back to the previous version
conda install spyder-kernels=1.9.3
Upvotes: 5
Reputation: 45
I had to combine some answers here.
First I removed spyder with:
pip uninstall spyder
conda uninstall spyder
After that I installed it again:
conda install spyder
This first part was based on @CrossEntropy answer.
This change did not solve the issue, but allowed me to update spyder to its newest version (4.1.5) as @quangtrank9 recommended.
This process avoid me to remove and reinstall anaconda. It would be an undesireble process.
Upvotes: 1
Reputation: 997
I faced the same issue on Spyder 4.1.4. I completely uninstalled spyder and reinstalled it to the latest version (which is 4.1.5 right now) and apparently they have resolved the underlying issue in this version. So, the following standard procedure should solve the problem, hopefully:
pip uninstall spyder
conda uninstall spyder
conda install spyder
I use the spyder in a conda env, hence I don't think pip uninstall
is really necessary.
Upvotes: 11
Reputation: 2387
I had to do a combination of the answers that are provided here:
spyder-kernels
using pip: sudo pip3 uninstall spyder_kernels==1.9.4
spyder
using conda: conda uninstall spyder
spyder
using conda: conda install spyder
Upvotes: 0
Reputation: 41
I updated to Spyder 4.1.4 this morning and ended up with the same issue when I tried to run my code. Worth noting I use Anaconda so not sure how that may impact you.
I tried reverting back to an older version of Spyder as well as upgrading to Spyder 4.1.5 via the Anaconda Prompt but was only successful in avoiding the error message you mention above by going into the Anaconda Navigator and removing the Spyder application entirely. I then installed Spyder 4.1.5 from the Anaconda Navigator and was able to run my code.
Upvotes: 4