To solve TypeError: runfile() got an unexpected keyword argument ‘current_namespace’ error follow below methods.
File "C:\anaconda3\lib\bdb.py", line 580, in run exec(cmd, globals, locals) File "<string>", line 1, in <module> TypeError: runfile() got an unexpected keyword argument 'current_namespace'
How to solve TypeError: runfile() got an unexpected keyword argument ‘current_namespace’ ?
Follow the given methods and solutions below.
Method 1 :
The above problem will be resolved in the very next edition of
spyder 5.1.2. You need downgrade the environment’s
ipykernel package to 6.2.0. Simply execute this command. First, activate the environment by typing conda activate
conda activate new_env
ipykernel to 6.2.0. Use the following command to install
ipykernel=6.2.0: conda install ipykernel=6.2.0
conda install ipykernel=6.2.0
Simply restart Spyder, and the problem should be resolved.
Spyder was entirely uninstalled and reinstalled to resolve the problem. It appears that the issue is that you are running an out-of-date version of the spyder kernels. There was a change here a while ago.