We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "a=5\n", "print('hello',a)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "argv": [ "python", "-m", "ipykernel_launcher", "-f", "{connection_file}" ], "display_name": "Python 3", "env": null, "interrupt_mode": "signal", "language": "python", "metadata": null, "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" }, "name": "utils1.ipynb" }, "nbformat": 4, "nbformat_minor": 2 }
First convertsion work:
$ jupytext --to py:percent --from ipynb utils1.ipynb [jupytext] Reading utils1.ipynb in format ipynb [jupytext] Updating the timestamp of utils1.py
Conversion back to original does not
$ jupytext --from py:percent --to ipynb utils1.py [jupytext] Reading utils1.py in format py:percent Traceback (most recent call last): File "/home/gmuller/Python/DataScience/bin/jupytext", line 8, in <module> sys.exit(jupytext()) File "/home/gmuller/Python/DataScience/lib/python3.8/site-packages/jupytext/cli.py", line 427, in jupytext exit_code += jupytext_single_file(nb_file, args, log) File "/home/gmuller/Python/DataScience/lib/python3.8/site-packages/jupytext/cli.py", line 494, in jupytext_single_file notebook = read(nb_file, fmt=fmt, config=config) File "/home/gmuller/Python/DataScience/lib/python3.8/site-packages/jupytext/jupytext.py", line 435, in read return read(stream, as_version=as_version, fmt=fmt, config=config, **kwargs) File "/home/gmuller/Python/DataScience/lib/python3.8/site-packages/jupytext/jupytext.py", line 444, in read return reads(fp.read(), fmt, config=config, **kwargs) File "/home/gmuller/Python/DataScience/lib/python3.8/site-packages/jupytext/jupytext.py", line 384, in reads format_name = read_format_from_metadata(text, ext) or fmt.get("format_name") File "/home/gmuller/Python/DataScience/lib/python3.8/site-packages/jupytext/formats.py", line 280, in read_format_from_metadata metadata = read_metadata(text, ext) File "/home/gmuller/Python/DataScience/lib/python3.8/site-packages/jupytext/formats.py", line 259, in read_metadata metadata, _, _, _ = header_to_metadata_and_cell(lines, comment, ext) File "/home/gmuller/Python/DataScience/lib/python3.8/site-packages/jupytext/header.py", line 228, in header_to_metadata_and_cell recursive_update(metadata, yaml.safe_load("\n".join(jupyter))["jupyter"]) File "/home/gmuller/Python/DataScience/lib/python3.8/site-packages/jupytext/header.py", line 148, in recursive_update target[key] = recursive_update(target.get(key, {}), value) File "/home/gmuller/Python/DataScience/lib/python3.8/site-packages/jupytext/header.py", line 146, in recursive_update del target[key] KeyError: 'env'
The text was updated successfully, but these errors were encountered:
Thanks @liar666 for reporting this.
Do you have any idea where this "env": null and "metadata": null in your kernelspec come from?
"env": null
"metadata": null
kernelspec
Anyway I agree they should not make Jupytext fail, I'll fix that part.
Sorry, something went wrong.
Reproduce and fix #792
233b9cd
9875426
b759a77
Hi @liar666 , this should be fixed in the dev version. See https://jupytext.readthedocs.io/en/latest/developing.html for how to install it locally. Thanks for reporting this!
I've tried to use EIN (Emacs Ipython Notebook package) on this source file, that might be the source of this problem :{ https://github.com/millejoh/emacs-ipython-notebook
Thanks for quick response and the patch I'll try it ASAP!!! EDIT: Works perfectly on my notebooks! Thanks again !!!
No branches or pull requests
First convertsion work:
Conversion back to original does not
The text was updated successfully, but these errors were encountered: