question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PYDEVD kernel error when starting Spyder

See original GitHub issue

Problem Description

Hi all, I receive this kernel error when Spyder starts up every time I start it. I have to restart the kernel a few times for it to begin working correctly.

image

What steps reproduce the problem?

  1. Starting Spyder for the first time

What is the expected output? What do you see instead?

if I force restart the kernel a few times, the kernel will begin working every once in a while.

Paste Traceback/Error Below (if applicable)

0.01s ‑ Debugger warning: The os.path.realpath.__code__.co_filename (ntpath.py)
0.00s ‑ is not absolute, which may make the debugger miss breakpoints.
0.00s ‑ Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.

Versions

  • Spyder version: 5.3.2
  • Python version: 3.8.10
  • Qt version: 5.15.2
  • PyQt version: 5.15.7
  • Operating System name/version: Win 11

Dependencies

# Mandatory:
atomicwrites >=1.2.0                 :  1.4.1 (OK)
chardet >=2.0.0                      :  5.0.0 (OK)
cloudpickle >=0.5.0                  :  2.1.0 (OK)
cookiecutter >=1.6.0                 :  2.1.1 (OK)
diff_match_patch >=20181111          :  20200713 (OK)
intervaltree                         :  None (OK)
IPython >=7.31.1;<8.0.0              :  7.34.0 (OK)
jedi >=0.17.2;<0.19.0                :  0.18.1 (OK)
jellyfish >=0.7                      :  0.9.0 (OK)
jsonschema >=3.2.0                   :  4.7.2 (OK)
keyring >=17.0.0                     :  23.6.0 (OK)
nbconvert >=4.0                      :  6.5.0 (OK)
numpydoc >=0.6.0                     :  1.4.0 (OK)
paramiko >=2.4.0                     :  2.11.0 (OK)
parso >=0.7.0;<0.9.0                 :  0.8.3 (OK)
pexpect >=4.4.0                      :  4.8.0 (OK)
pickleshare >=0.4                    :  0.7.5 (OK)
psutil >=5.3                         :  5.9.1 (OK)
pygments >=2.0                       :  2.12.0 (OK)
pylint >=2.5.0;<3.0                  :  2.14.4 (OK)
pyls_spyder >=0.4.0                  :  0.4.0 (OK)
pylsp >=1.5.0;<1.6.0                 :  1.5.0 (OK)
pylsp_black >=1.2.0                  :  1.2.1 (OK)
qdarkstyle >=3.0.2;<3.1.0            :  3.0.3 (OK)
qstylizer >=0.1.10                   :  0.2.1 (OK)
qtawesome >=1.0.2                    :  1.1.1 (OK)
qtconsole >=5.3.0;<5.4.0             :  5.3.1 (OK)
qtpy >=2.1.0                         :  2.1.0 (OK)
rtree >=0.9.7                        :  1.0.0 (OK)
setuptools >=49.6.0                  :  63.1.0 (OK)
sphinx >=0.6.6                       :  5.0.2 (OK)
spyder_kernels >=2.3.2;<2.4.0        :  2.3.2 (OK)
textdistance >=4.2.0                 :  4.3.0 (OK)
three_merge >=0.1.1                  :  0.1.1 (OK)
watchdog                             :  2.1.9 (OK)
zmq >=22.1.0                         :  23.2.0 (OK)

# Optional:
cython >=0.21                        :  0.29.30 (OK)
matplotlib >=3.0.0                   :  3.5.2 (OK)
numpy >=1.7                          :  1.22.4 (OK)
pandas >=1.1.1                       :  1.4.3 (OK)
scipy >=0.17.0                       :  1.8.1 (OK)
sympy >=0.7.3                        :  1.10.1 (OK)

# Spyder plugins:
spyder_terminal.terminalplugin 1.2.2 :  1.2.2 (OK)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ccordoba12commented, Aug 8, 2022

@dalthviz, a user that reported the same problem on issue #18977 confirmed that the fix you mentioned on https://github.com/spyder-ide/spyder/issues/18908#issuecomment-1205494761 solves the problem. So please go ahead and implement it.

0reactions
dalthvizcommented, Aug 4, 2022

🤔 right, checking I think if an error gets detected the shell is being shutdown. @Eilermoon could you add the Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation. as a new entry for the benign_errors list at https://github.com/spyder-ide/spyder/blob/1172bb4678970250c8e8f46a70a151c00d32d69f/spyder/plugins/ipythonconsole/widgets/client.py#L576-L592

With the default standalone installer installation dir the client.py file should be at C:\Users\<your user>\AppData\Local\Programs\Spyder\pkgs\spyder\plugins\ipythonconsole\widgets\client.py if you did the installation for only the current user.

Let us know if the change there helps!

Read more comments on GitHub >

github_iconTop Results From Across the Web

An error ocurred while starting the kernel in spyder
I ran these two pip codes: --user pip install azureml-explain-model and --user pip install azureml-interpret in the anaconda command prompt and ...
Read more >
Common Illnesses — Spyder 5 documentation
If you receive the message An error occurred while starting the kernel in the IPython Console, Spyder was unable to launch a new...
Read more >
An Introduction to Spyder Python IDE - Great Learning
Why Python? Why Spyder Python? Steps to install Spyder; Spyder interface walkthrough; Benefits of Spyder; Errors; Console; Comments; Variable Explorer; File ...
Read more >
成功解决:spyder 出现[An error ocurred while starting the ...
在终端中输入pip install spyder-kernels在终端中输入spyder --reset,重置spyder配置,问题得以解决。
Read more >
Is Spyder good for Python? - Quora
After more than 40 years of programming in dozens of languages, I can't say another other language I've used will let you do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found