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

Opening console for notebook without kernel yields an error #152

Closed
ccordoba12 opened this issue Jul 27, 2018 · 3 comments
Closed

Opening console for notebook without kernel yields an error #152

ccordoba12 opened this issue Jul 27, 2018 · 3 comments
Assignees
Milestone

Comments

@ccordoba12
Copy link
Member

@rebelclause commented on Thu Jul 26 2018

Description

What steps will reproduce the problem?

From an open notebook, right click the containing widget's tab and select 'open console'.

This error pops up.

Traceback

  File "/home/tim/.local/lib/python3.6/site-packages/spyder_notebook/notebookplugin.py", line 424, in open_console
    None)
  File "/home/tim/.local/lib/python3.6/site-packages/spyder/plugins/ipythonconsole.py", line 1716, in _create_client_for_kernel
    cf_path = osp.dirname(connection_file)
  File "/usr/lib/python3.6/posixpath.py", line 156, in dirname
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Versions

  • Spyder version: 3.3.0
  • Python version: 3.6.5
  • Qt version: 5.9.3
  • PyQt5 version: 5.9.2
  • Operating System: Linux 4.15.0-29-generic

Dependencies

pyflakes >=0.6.0  :  2.0.0 (OK)
pycodestyle >=2.3 :  2.4.0 (OK)
pygments >=2.0    :  2.2.0 (OK)
sphinx >=0.6.6    :  1.7.6 (OK)
rope >=0.9.4      :  0.10.7 (OK)
jedi >=0.9.0      :  0.12.1 (OK)
psutil >=0.3      :  5.4.6 (OK)
nbconvert >=4.0   :  5.3.1 (OK)
pandas >=0.13.1   :  None (NOK)
numpy >=1.7       :  None (NOK)
sympy >=0.7.3     :  1.2 (OK)
cython >=0.21     :  0.28.4 (OK)
qtconsole >=4.2.0 :  4.3.1 (OK)
IPython >=4.0     :  6.4.0 (OK)
matplotlib >=2.0.0:  None (NOK)
pylint >=0.25     :  2.0.1 (OK)

@ccordoba12 commented on Thu Jul 26 2018

Moving to the right repo.

@ccordoba12
Copy link
Member Author

@rebelclause, we'll try to update spyder-notebook to work with Spyder 3.3+ during the next weeks.

@jitseniesen
Copy link
Member

I can reproduce the error message. Open a notebook, shutdown the kernel (in the notebook menu embedded in HTML, click Kernel > Shutdown) and the open a console (Open console in the notebook options menu). We should catch this situation.

@jitseniesen jitseniesen self-assigned this Aug 29, 2018
@jitseniesen jitseniesen added this to the v0.1.3 milestone Aug 29, 2018
@jitseniesen jitseniesen changed the title Attempt to open a console from spyder-notebook plugin failed Opening console for notebook without kernel yields an error Aug 29, 2018
@ccordoba12
Copy link
Member Author

Ok, then we should check first if the current notebook has an associated kernel and open a console connected to it.

Else we need to inform users about it with a QMessage.

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

2 participants