Search code examples
python-3.xanacondaspyder

Correct Debug Startup error in Spyder 5.0.5


I have recently incurred a problem when running Spyder 5.0.5 under Anaconda. I believe I have somehow corrupted a Debug start up file and can't figure where the file is located or how to remedy the situation. When running code in Spyder it performs correctly, but if I attempt to run in debug mode I get the following traceback error message:

debugfile('D:/pvtests/PowerTableTests/PowerTable/SiteLoadDisplay1.py', wdir='D:/pvtests/PowerTableTests/PowerTable')
Traceback (most recent call last):

  File "C:\Users\xxxx\AppData\Local\Temp/ipykernel_1468/434203341.py", line 1, in <module>
    debugfile('D:/pvtests/PowerTableTests/PowerTable/SiteLoadDisplay1.py', wdir='D:/pvtests/PowerTableTests/PowerTable')

  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'

This issue began occurring a couple of days ago, I de-installed Anaconda and then reinstalled it, thinking that would clear up the issue, but it didn't fix the problem.

I have also tried the Spyder recommendation of issuing Spyder --reset command from the anaconda power shell console.

Most recently. I tried rebuilding the project.

Has anyone encountered this type of problem, any thoughts on how to correct the issue?


Solution

  • It seems the answer to my question according to the Spyder support group is to reinstall the ipykernel using the following command: conda install ipykernel=5