Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

818
Views
TypeError: runfile() got an unexpected keyword argument 'current_namespace'

I got the error message when trying to debug a python script:

debugfile('C:/Users/Wei-shan/Desktop/pythonScripts/simple pendulum.py', wdir='C:/Users/Wei-shan/Desktop/pythonScripts', current_namespace=True)
Traceback (most recent call last):

  File "C:\Users\Wei-shan\AppData\Local\Temp/ipykernel_19384/837447315.py", line 1, in <module>
    debugfile('C:/Users/Wei-shan/Desktop/pythonScripts/simple pendulum.py', wdir='C:/Users/Wei-shan/Desktop/pythonScripts', current_namespace=True)

  File "D:\anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 589, in debugfile
    enter_debugger(

  File "D:\anaconda3\lib\site-packages\spyder_kernels\customize\spyderpdb.py", line 773, in enter_debugger
    debugger.run(code)

  File "D:\anaconda3\lib\site-packages\spyder_kernels\customize\spyderpdb.py", line 716, in run
    super(SpyderPdb, self).run(cmd, globals, locals)

  File "D:\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'

Any suggestions? Thank you very much

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

For me, the error was fixed by completely uninstalling and reinstalling Spyder. It looks like the problem is that you have an outdated version of the spyder kernels. There was a change some time ago here. Maybe a simple

conda update --all

is enough. But i haven't tested this.

over 4 years ago · Santiago Trujillo Report

0

I faced the same problem too. Even uninstall/reinstall of spyder didn't help (in Anaconda-Navigator). Update says that all packages are up to date (including kernels). Creating a different environement in Anaconda-Navigator and installing spyder there shows also same problem...

over 4 years ago · Santiago Trujillo Report

0

This will be fixed in Spyder 5.1.2. In the meantime, downgrade the ipykernel package in the environment to 6.2.0:

conda activate my_env
conda install ipykernel=6.2.0

You should see something like:

The following packages will be DOWNGRADED:

  ipykernel                            6.4.1-py37h06a4308_1 --> 6.2.0-py37h06a4308_1

after which, restart spyder and it should be good.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!