Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CommError: The comm is not connected when changing Matplotlib backend #15875

Closed
WisamAbbasi opened this issue Jun 15, 2021 · 15 comments
Closed

Comments

@WisamAbbasi
Copy link

Description

What steps will reproduce the problem?

when choosing inline backend graphics, the spyder returns an error message

Traceback

Traceback (most recent call last):
  File "C:\Users\wisam\anaconda3\envs\PEA Tabular Project\lib\site-packages\spyder\plugins\preferences\widgets\configdialog.py", line 127, in accept
    configpage.apply_changes()
  File "C:\Users\wisam\anaconda3\envs\PEA Tabular Project\lib\site-packages\spyder\plugins\preferences\api.py", line 110, in apply_changes
    self.apply_callback()
  File "C:\Users\wisam\anaconda3\envs\PEA Tabular Project\lib\site-packages\spyder\plugins\preferences\api.py", line 142, in <lambda>
    self._apply_settings_tabs(self.changed_options))
  File "C:\Users\wisam\anaconda3\envs\PEA Tabular Project\lib\site-packages\spyder\plugins\preferences\api.py", line 170, in _apply_settings_tabs
    self.apply_settings(options)
  File "C:\Users\wisam\anaconda3\envs\PEA Tabular Project\lib\site-packages\spyder\api\preferences.py", line 104, in wrapper
    func(opts)
  File "C:\Users\wisam\anaconda3\envs\PEA Tabular Project\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 447, in apply_plugin_settings
    for client in self.clients]
  File "C:\Users\wisam\anaconda3\envs\PEA Tabular Project\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 447, in <listcomp>
    for client in self.clients]
  File "C:\Users\wisam\anaconda3\envs\PEA Tabular Project\lib\site-packages\spyder\plugins\ipythonconsole\widgets\shell.py", line 343, in get_matplotlib_backend
    blocking=True).get_matplotlib_backend()
  File "C:\Users\wisam\anaconda3\envs\PEA Tabular Project\lib\site-packages\spyder_kernels\comms\commbase.py", line 550, in __call__
    raise CommError("The comm is not connected.")
spyder_kernels.comms.commbase.CommError: The comm is not connected.

Versions

  • Spyder version: 5.0.0
  • Python version: 3.6.13
  • Qt version: 5.9.6
  • PyQt5 version: 5.9.2
  • Operating System: Windows 10

Dependencies


# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  3.0.4 (OK)
cloudpickle >=0.5.0           :  1.6.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.16.1 (OK)
jedi =0.17.2                  :  0.17.2 (OK)
jsonschema >=3.2.0            :  3.2.0 (OK)
keyring >=17.0.0              :  22.3.0 (OK)
nbconvert >=4.0               :  6.0.7 (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.8.1 (OK)
pylint >=1.0                  :  2.7.4 (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.3.2 (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.1.10 (OK)
qtawesome >=0.5.7             :  1.0.2 (OK)
qtconsole >=5.0.3             :  5.0.3 (OK)
qtpy >=1.5.0                  :  1.9.0 (OK)
rtree >=0.8.3                 :  0.9.4 (OK)
setuptools >=39.0.0           :  52.0.0.post20210125 (OK)
sphinx >=0.6.6                :  3.5.3 (OK)
spyder_kernels >=2.0.1,<2.1.0 :  2.0.1 (NOK)
textdistance >=4.2.0          :  4.2.1 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3;<2.0.0      :  1.0.2 (OK)
zmq >=17                      :  20.0.0 (OK)

# Optional:
cython >=0.21                 :  None (NOK)
matplotlib >=2.0.0            :  3.3.4 (OK)
numpy >=1.7                   :  1.19.5 (OK)
pandas >=1.1.1                :  1.1.5 (OK)
scipy >=0.17.0                :  1.5.2 (OK)
sympy >=0.7.3                 :  None (NOK)
@steff456
Copy link
Member

Hi @WisamAbbasi,

This is probably an issue with your firewall and/or antivirus. Please try to deactivate them and try again. Also if you want you can try to upgrade to the latest version, 5.0.4 and check if the error persists as well.

@WisamAbbasi
Copy link
Author

I tried to deactivate them, but not working either and I am using the spyder v5

@steff456
Copy link
Member

Are you using the latest release 5.0.4 or 5.0.0?

@WisamAbbasi
Copy link
Author

It is 5.0.4

@ccordoba12
Copy link
Member

@WisamAbbasi, is the variable explorer working for you?

@ccordoba12
Copy link
Member

@dalthviz, could you check if you can reproduce this error with our Windows installer (see issue #16272) and Anaconda?

@ccordoba12
Copy link
Member

@impact27, do you have an idea about what's happening here?

@dalthviz
Copy link
Member

@ccordoba12 I was unable to reproduce this (is working for me with the installer and anaconda/conda-forge).

@ccordoba12
Copy link
Member

@WisamAbbasi, @Galganom, @Walberf17, @ninad-sc, is the variable explorer working for you? I mean, if you evaluate a = 1 in the console, do you see that variable displayed in the Variable Explorer?

@Walberf17
Copy link

Walberf17 commented Aug 24, 2021 via email

@ccordoba12
Copy link
Member

Ok, that's expected. Then this problem is probably caused by your firewall or antivirus. Please deactivate them and try again.

@Walberf17
Copy link

Walberf17 commented Aug 25, 2021 via email

@ccordoba12
Copy link
Member

ccordoba12 commented Aug 25, 2021

Sorry, I don't have more advice for you. But this is definitely not a problem in Spyder.

@Walberf17
Copy link

Walberf17 commented Aug 25, 2021 via email

@ccordoba12
Copy link
Member

I found this is related to a bug when setting interactive Matplotlib backends. It'll be fixed in the next version of spyder-kernels (2.1.3), to be released soon.

Spyder itself will pick that change by default in its next version (5.2.0), to be released later this month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants