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.

Spyder IPython Kernel crash

See original GitHub issue

Description

What steps will reproduce the problem?

Install Anaconda3-2021.05-Windows-x86_64

update all packages: conda update --all

run this code:

import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import host_subplot

plt.figure(figsize=[10,5]) host = host_subplot(111)

–>Kernel restarts after a short time

Traceback

Traceback (most recent call last):
  File "Anaconda3\lib\site-packages\qtconsole\manager.py", line 27, in poll
    super().poll()
  File "Anaconda3\lib\site-packages\jupyter_client\restarter.py", line 127, in poll
    self.kernel_manager.restart_kernel(now=True, newports=newports)
  File "\Anaconda3\lib\site-packages\jupyter_client\utils.py", line 25, in wrapped
    return loop.run_until_complete(coro(*args, **kwargs))
  File "\Anaconda3\lib\site-packages\nest_asyncio.py", line 70, in run_until_complete
    return f.result()
  File "\Anaconda3\lib\asyncio\futures.py", line 178, in result
    raise self._exception
  File "\Anaconda3\lib\asyncio\tasks.py", line 280, in __step
    result = coro.send(None)
  File "\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 477, in _async_restart_kernel
    await ensure_async(self.shutdown_kernel(now=now, restart=True))
  File "\Anaconda3\lib\site-packages\jupyter_client\utils.py", line 25, in wrapped
    return loop.run_until_complete(coro(*args, **kwargs))
  File "\Anaconda3\lib\site-packages\nest_asyncio.py", line 70, in run_until_complete
    return f.result()
  File "\Anaconda3\lib\asyncio\futures.py", line 178, in result
    raise self._exception
  File "\Anaconda3\lib\asyncio\tasks.py", line 280, in __step
    result = coro.send(None)
  File "\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 436, in _async_shutdown_kernel
    await ensure_async(self._kill_kernel())
  File "\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\utils\manager.py", line 92, in _kill_kernel
    self.kill_proc_tree(self.kernel.pid)
AttributeError: 'SpyderKernelManager' object has no attribute 'kernel'

Versions

  • Spyder version: 5.0.5
  • Python version: 3.8.12
  • Qt version: 5.9.7
  • PyQt5 version: 5.9.2
  • Operating System: Windows 10

Dependencies


# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  2.0.0 (OK)
cookiecutter >=1.6.0          :  1.7.2 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.6.0               :  7.29.0 (OK)
jedi =0.17.2                  :  0.17.2 (OK)
jsonschema >=3.2.0            :  3.2.0 (OK)
keyring >=17.0.0              :  23.1.0 (OK)
nbconvert >=4.0               :  6.1.0 (OK)
numpydoc >=0.6.0              :  1.1.0 (OK)
paramiko >=2.4.0              :  2.7.2 (OK)
parso =0.7.0                  :  0.7.0 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.8.0 (OK)
pygments >=2.0                :  2.10.0 (OK)
pylint >=1.0                  :  2.9.6 (OK)
pyls >=0.36.2;<1.0.0          :  0.36.2 (OK)
pyls_black >=0.4.6            :  0.4.6 (OK)
pyls_spyder >=0.3.2;<0.4.0    :  0.3.2 (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.1.10 (OK)
qtawesome >=1.0.2             :  1.0.2 (OK)
qtconsole >=5.1.0             :  5.1.1 (OK)
qtpy >=1.5.0                  :  1.10.0 (OK)
rtree >=0.9.7                 :  0.9.7 (OK)
setuptools >=39.0.0           :  58.0.4 (OK)
sphinx >=0.6.6                :  4.2.0 (OK)
spyder_kernels >=2.0.4;<2.1.0 :  2.0.5 (OK)
textdistance >=4.2.0          :  4.2.1 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.3 (OK)
zmq >=17                      :  22.2.1 (OK)

# Optional:
cython >=0.21                 :  0.29.24 (OK)
matplotlib >=2.0.0            :  3.4.3 (OK)
numpy >=1.7                   :  1.20.3 (OK)
pandas >=1.1.1                :  1.3.4 (OK)
scipy >=0.17.0                :  1.7.1 (OK)
sympy >=0.7.3                 :  1.9 (OK)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
dalthvizcommented, Nov 4, 2021

Hi @pepo83 and @ij007 just in case:

1reaction
pepo83commented, Nov 4, 2021

freetype downgrade from 2.11.0 to 2.10.4 solved the issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spyder problem, kernel died all the time when tried to run ...
The thing is when we run the code, we don't see this warning message like other editors, but when appears, it crashes the...
Read more >
spyder's kernel dies when I try to make a plot [duplicate]
Help! I made a new environment using anaconda: conda create -n ws_fcst python=3.8 spyder pandas numpy matplotlib scikit-learn sqlalchemy pyodbc.
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 >
[spyder] ipython crash on startup: "It seems the kernel died ...
Hi, today when I restarted spyder I could not launch the ipython console anymore: "It seems the kernel died unexpectedly. Use 'Restart kernel'...
Read more >
Walkthrough — tellurium 2.2.3 documentation
Similar to Jupyter notebook, Spyder IDE allows you to create cells. To create a cell, simply put #%% in the script. Each #%%...
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