Bug 1558680 - [abrt] python3-nbconvert: get_kernel_spec(): kernelspec.py:175:get_kernel_spec:jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3
Summary: [abrt] python3-nbconvert: get_kernel_spec(): kernelspec.py:175:get_kernel_spe...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python-nbconvert
Version: 27
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mukundan Ragavan
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:1bf76e8173682eb4495f2cad3e6...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-20 18:56 UTC by Jan Vesely
Modified: 2018-11-05 18:17 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-05 18:17:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (3.54 KB, text/plain)
2018-03-20 18:56 UTC, Jan Vesely
no flags Details
File: cgroup (355 bytes, text/plain)
2018-03-20 18:56 UTC, Jan Vesely
no flags Details
File: cpuinfo (1.17 KB, text/plain)
2018-03-20 18:56 UTC, Jan Vesely
no flags Details
File: environ (3.69 KB, text/plain)
2018-03-20 18:56 UTC, Jan Vesely
no flags Details
File: mountinfo (3.92 KB, text/plain)
2018-03-20 18:56 UTC, Jan Vesely
no flags Details
File: namespaces (129 bytes, text/plain)
2018-03-20 18:56 UTC, Jan Vesely
no flags Details
File: open_fds (249 bytes, text/plain)
2018-03-20 18:56 UTC, Jan Vesely
no flags Details

Description Jan Vesely 2018-03-20 18:56:18 UTC
Version-Release number of selected component:
python3-nbconvert-5.3.1-3.fc27

Additional info:
reporter:       libreport-2.9.3
cmdline:        /usr/bin/python3 /usr/bin/jupyter-nbconvert --log-level WARN --to notebook --execute --ExecutePreprocessor.timeout=300 --stdout '/home/vesely/PsyNeuLink/tutorial/PsyNeuLink Tutorial.ipynb'
crash_function: get_kernel_spec
exception_type: KeyError
executable:     /usr/bin/jupyter-nbconvert
kernel:         4.15.8-300.fc27.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
kernelspec.py:175:get_kernel_spec:jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/jupyter_client/kernelspec.py", line 173, in get_kernel_spec
    resource_dir = d[kernel_name.lower()]
KeyError: 'python3'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/jupyter-nbconvert", line 11, in <module>
    load_entry_point('nbconvert==5.3.1', 'console_scripts', 'jupyter-nbconvert')()
  File "/usr/lib/python3.6/site-packages/jupyter_core/application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/usr/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/usr/lib/python3.6/site-packages/nbconvert/nbconvertapp.py", line 325, in start
    self.convert_notebooks()
  File "/usr/lib/python3.6/site-packages/nbconvert/nbconvertapp.py", line 493, in convert_notebooks
    self.convert_single_notebook(notebook_filename)
  File "/usr/lib/python3.6/site-packages/nbconvert/nbconvertapp.py", line 464, in convert_single_notebook
    output, resources = self.export_single_notebook(notebook_filename, resources, input_buffer=input_buffer)
  File "/usr/lib/python3.6/site-packages/nbconvert/nbconvertapp.py", line 393, in export_single_notebook
    output, resources = self.exporter.from_filename(notebook_filename, resources=resources)
  File "/usr/lib/python3.6/site-packages/nbconvert/exporters/exporter.py", line 174, in from_filename
    return self.from_file(f, resources=resources, **kw)
  File "/usr/lib/python3.6/site-packages/nbconvert/exporters/exporter.py", line 192, in from_file
    return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw)
  File "/usr/lib/python3.6/site-packages/nbconvert/exporters/notebook.py", line 31, in from_notebook_node
    nb_copy, resources = super(NotebookExporter, self).from_notebook_node(nb, resources, **kw)
  File "/usr/lib/python3.6/site-packages/nbconvert/exporters/exporter.py", line 134, in from_notebook_node
    nb_copy, resources = self._preprocess(nb_copy, resources)
  File "/usr/lib/python3.6/site-packages/nbconvert/exporters/exporter.py", line 311, in _preprocess
    nbc, resc = preprocessor(nbc, resc)
  File "/usr/lib/python3.6/site-packages/nbconvert/preprocessors/base.py", line 47, in __call__
    return self.preprocess(nb, resources)
  File "/usr/lib/python3.6/site-packages/nbconvert/preprocessors/execute.py", line 257, in preprocess
    cwd=path)
  File "/usr/lib/python3.6/site-packages/nbconvert/preprocessors/execute.py", line 237, in start_new_kernel
    km.start_kernel(**kwargs)
  File "/usr/lib/python3.6/site-packages/jupyter_client/manager.py", line 230, in start_kernel
    kernel_cmd = self.format_kernel_cmd(extra_arguments=extra_arguments)
  File "/usr/lib/python3.6/site-packages/jupyter_client/manager.py", line 170, in format_kernel_cmd
    cmd = self.kernel_spec.argv + extra_arguments
  File "/usr/lib/python3.6/site-packages/jupyter_client/manager.py", line 82, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/usr/lib/python3.6/site-packages/jupyter_client/kernelspec.py", line 175, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3

Local variables in innermost frame:
d: {}
kernel_name: 'python3'
self: <jupyter_client.kernelspec.KernelSpecManager object at 0x7f398057a7b8>

Comment 1 Jan Vesely 2018-03-20 18:56:22 UTC
Created attachment 1410733 [details]
File: backtrace

Comment 2 Jan Vesely 2018-03-20 18:56:23 UTC
Created attachment 1410734 [details]
File: cgroup

Comment 3 Jan Vesely 2018-03-20 18:56:24 UTC
Created attachment 1410735 [details]
File: cpuinfo

Comment 4 Jan Vesely 2018-03-20 18:56:25 UTC
Created attachment 1410736 [details]
File: environ

Comment 5 Jan Vesely 2018-03-20 18:56:26 UTC
Created attachment 1410737 [details]
File: mountinfo

Comment 6 Jan Vesely 2018-03-20 18:56:27 UTC
Created attachment 1410738 [details]
File: namespaces

Comment 7 Jan Vesely 2018-03-20 18:56:28 UTC
Created attachment 1410739 [details]
File: open_fds

Comment 8 Mukundan Ragavan 2018-03-20 22:35:12 UTC
Can you give me some steps to try this out?

I have pushed an update with fixed dependency chain for nbconvert. Can you test the latest build?

Comment 9 Jan Vesely 2018-03-22 06:57:28 UTC
(In reply to Mukundan Ragavan from comment #8)
> Can you give me some steps to try this out?
> 
> I have pushed an update with fixed dependency chain for nbconvert. Can you
> test the latest build?

I think this was a local configuration error.
$ jupyter kernelspec list
returned an empty set

This error went away after installing python kernel;
$ sudo dnf install python3-ipykernel

now:
$ jupyter kernelspec list
Available kernels:
  python3    /usr/share/jupyter/kernels/python3

so it might be just missing dependency somewhere.

thanks,
Jan

Comment 10 Jan Vesely 2018-03-22 07:01:48 UTC
oh, I ran into this running PsyNeuLink[0] test suite:
pytest tests/misc/test_notebooks.py

[0] https://github.com/PrincetonUniversity/PsyNeuLink -b devel

Comment 11 Elliott Sales de Andrade 2018-11-05 11:02:55 UTC
The test suite is using the `--execute` flag to re-run the notebook. This means it needs the kernel that was used to create it installed as well.

No specific kernel is required for nbconvert, so it wasn't installed for you. Installing python3-ipykernel was the correct course of action.

I suggest closing this report, since it's not a bug, really.

Comment 12 Jan Vesely 2018-11-05 18:17:27 UTC
(In reply to Elliott Sales de Andrade from comment #11)
> The test suite is using the `--execute` flag to re-run the notebook. This
> means it needs the kernel that was used to create it installed as well.
> 
> No specific kernel is required for nbconvert, so it wasn't installed for
> you. Installing python3-ipykernel was the correct course of action.
> 
> I suggest closing this report, since it's not a bug, really.

Right. Thanks for the explanation.


Note You need to log in before you can comment on or make changes to this bug.