Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

819
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda