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

Spyder cannot connect to kernel #8134

Closed
10 tasks done
briancroxall opened this issue Oct 23, 2018 · 2 comments
Closed
10 tasks done

Spyder cannot connect to kernel #8134

briancroxall opened this issue Oct 23, 2018 · 2 comments

Comments

@briancroxall
Copy link

briancroxall commented Oct 23, 2018

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

While troubleshooting everything related to #8132, I uninstalled and reinstalled Spyder. Upon reinstalling, Spyder can no longer connect to kernel. To double-check everything, I completely uninstalled Anaconda according to documentation and uninstalled Spyder. After reinstalling Anaconda and Spyder, the problem persists. I tried conda install -f spyder as suggested in the comments to #8030.

Based on solutions for this issue on Stackoverflow that were posted earlier in 2018, I also tried downgrading to pyzmq 16.0.3 and Tornado 4.x.x. Neither approach worked and I have updated to the newer versions of both of these packages.

What steps reproduce the problem?

  1. Open Spyder and wait for kernel to connect.

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

Expected: Spyder should connect to kernel.
Instead: Spyder cannot connect to kernel.

Paste Traceback/Error Below (if applicable)

Not applicable

Versions

  • Spyder version: 3.3.1
  • Python version: 3.6.6
  • Qt version: 5.9.6
  • PyQt version: 5.9.2
  • Operating System name/version: Mac OS 10.14 (Mojave)

Dependencies

IPython >=4.0     :  7.0.1 (OK)
cython >=0.21     :  0.29 (OK)
jedi >=0.9.0      :  0.13.1 (OK)
matplotlib >=2.0.0:  3.0.0 (OK)
nbconvert >=4.0   :  5.3.1 (OK)
numpy >=1.7       :  1.15.3 (OK)
pandas >=0.13.1   :  0.23.4 (OK)
psutil >=0.3      :  5.4.7 (OK)
pycodestyle >=2.3 :  2.4.0 (OK)
pyflakes >=0.6.0  :  2.0.0 (OK)
pygments >=2.0    :  2.2.0 (OK)
pylint >=0.25     :  2.1.1 (OK)
qtconsole >=4.2.0 :  4.4.2 (OK)
rope >=0.9.4      :  0.11.0 (OK)
sphinx >=0.6.6    :  1.8.1 (OK)
sympy >=0.7.3     :  1.3 (OK)
@briancroxall
Copy link
Author

briancroxall commented Oct 23, 2018

I observed that if I waited for approximately 4m15s (I had a stopwatch running), that the kernel would eventually connect with the following error printed in the console.

NOTE: The following error appeared when setting your Matplotlib backend

Traceback (most recent call last):
  File "/anaconda3/lib/python3.6/site-packages/matplotlib/font_manager.py", line 1353, in <module>
    fontManager = json_load(_fmcache)
  File "/anaconda3/lib/python3.6/site-packages/matplotlib/font_manager.py", line 888, in json_load
    with open(filename, 'r') as fh:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/briancroxall/.matplotlib/fontlist-v300.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/anaconda3/lib/python3.6/site-packages/spyder_kernels/console/kernel.py", line 473, in _set_mpl_backend
    get_ipython().run_line_magic(magic, backend)
  File "/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2285, in run_line_magic
    result = fn(*args,**kwargs)
  File "<decorator-gen-107>", line 2, in matplotlib
  File "/anaconda3/lib/python3.6/site-packages/IPython/core/magic.py", line 187, in <lambda>
    call = lambda f, *a, **k: f(*a, **k)
  File "/anaconda3/lib/python3.6/site-packages/IPython/core/magics/pylab.py", line 99, in matplotlib
    gui, backend = self.shell.enable_matplotlib(args.gui)
  File "/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3353, in enable_matplotlib
    pt.activate_matplotlib(backend)
  File "/anaconda3/lib/python3.6/site-packages/IPython/core/pylabtools.py", line 313, in activate_matplotlib
    import matplotlib.pyplot
  File "/anaconda3/lib/python3.6/site-packages/matplotlib/pyplot.py", line 32, in <module>
    import matplotlib.colorbar
  File "/anaconda3/lib/python3.6/site-packages/matplotlib/colorbar.py", line 32, in <module>
    import matplotlib.contour as contour
  File "/anaconda3/lib/python3.6/site-packages/matplotlib/contour.py", line 18, in <module>
    import matplotlib.font_manager as font_manager
  File "/anaconda3/lib/python3.6/site-packages/matplotlib/font_manager.py", line 1363, in <module>
    _rebuild()
  File "/anaconda3/lib/python3.6/site-packages/matplotlib/font_manager.py", line 1344, in _rebuild
    fontManager = FontManager()
  File "/anaconda3/lib/python3.6/site-packages/matplotlib/font_manager.py", line 978, in __init__
    ttffiles = findSystemFonts(paths) + findSystemFonts()
  File "/anaconda3/lib/python3.6/site-packages/matplotlib/font_manager.py", line 270, in findSystemFonts
    fontfiles.update(OSXInstalledFonts(fontext=fontext))
  File "/anaconda3/lib/python3.6/site-packages/matplotlib/font_manager.py", line 218, in OSXInstalledFonts
    for directory in directories
  File "/anaconda3/lib/python3.6/site-packages/matplotlib/font_manager.py", line 220, in <listcomp>
    for path in list_fonts(directory, ext)]
  File "/anaconda3/lib/python3.6/site-packages/matplotlib/font_manager.py", line 157, in list_fonts
    for path in filter(Path.is_file, Path(directory).glob("**/*.*"))
  File "/anaconda3/lib/python3.6/site-packages/matplotlib/font_manager.py", line 156, in <listcomp>
    return [str(path)
  File "/anaconda3/lib/python3.6/pathlib.py", line 1098, in glob
    for p in selector.select_from(self):
  File "/anaconda3/lib/python3.6/pathlib.py", line 560, in _select_from
    for p in successor_select(starting_point, is_dir, exists, scandir):
  File "/anaconda3/lib/python3.6/pathlib.py", line 523, in _select_from
    entries = list(scandir(parent_path))
BlockingIOError: [Errno 35] Resource temporarily unavailable: 'Box/ODH - External/Compling3 - Backup/export/compling/usr1/local/.cslu/Toolkit/2.0'

@briancroxall
Copy link
Author

After some more digging and looking into this error message, I think that the problem is related to matplotlib, which just moved to 3.0.0.

After consulting this thread and this thread, it appears that a solution is to downgrade to matplotlib 2.2.3 until matplotlib 3.0.1 is released.

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

No branches or pull requests

1 participant