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

Error if kernelspec missing #195

Closed
psychemedia opened this issue May 17, 2019 · 2 comments · Fixed by #197
Closed

Error if kernelspec missing #195

psychemedia opened this issue May 17, 2019 · 2 comments · Fixed by #197

Comments

@psychemedia
Copy link
Contributor

I've been experimenting with various publishing workflows, one of which involves creating .md and then converting it to .ipynb with Jupytext.

Atm, Jupytext doesn't seem to create a kernelspec element in the notebook format (it is created if the notebook is opened and saved) which causes an error when running Jupyter Book on .ipynb created straight from .md using Jupytext:

Traceback (most recent call last):
  File "/usr/local/bin/jupyter-book", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/jupyter_book/main.py", line 29, in main
    commands[args.command]()
  File "/usr/local/lib/python3.7/site-packages/jupyter_book/commands/build.py", line 52, in build
    PATH_TEMPLATE, local_build, execute, overwrite)
  File "/usr/local/lib/python3.7/site-packages/jupyter_book/build.py", line 221, in build_book
    kernel_name = data['metadata']['kernelspec']['name']
KeyError: 'kernelspec'
@joergbrech
Copy link
Contributor

You are right, I think we should make sure that the kernelspec element (and the metadata element) exist before we try to read them, see the corresponding PR.

@psychemedia
Copy link
Contributor Author

psychemedia commented May 17, 2019

@joergbrech Great, thanks..

There was also a workaround from the Jupytext side.

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

Successfully merging a pull request may close this issue.

2 participants