Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

817
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda