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'
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.
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
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With