Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spyder returning TypeError after updating to Spyder 4.1.4

Tags:

spyder

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'
like image 575
Max Avatar asked Sep 04 '20 10:09

Max


4 Answers

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.

like image 67
CrossEntropy Avatar answered Nov 01 '22 13:11

CrossEntropy


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
like image 30
Covich Avatar answered Nov 01 '22 14:11

Covich


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.

like image 4
jm1696 Avatar answered Nov 01 '22 14:11

jm1696


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.

like image 4
user1234 Avatar answered Nov 01 '22 15:11

user1234