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

Strange behaviour for --set-formats after --to py:percent #399

Closed
MPKonst opened this issue Dec 13, 2019 · 3 comments
Closed

Strange behaviour for --set-formats after --to py:percent #399

MPKonst opened this issue Dec 13, 2019 · 3 comments
Milestone

Comments

@MPKonst
Copy link

MPKonst commented Dec 13, 2019

I am having the following issue when I use the CLI for jupytext.
While in a folder notebooks containing a single file notebook_first.ipynb the following:

jupytext --to py:percent notebook_first.ipynb # works fine, notebook_first.py is created
jupytext --set-formats ipynb,py:percent notebook_first.ipynb

thows a KeyError: 'formats'. If I only run the second command, things work fine, that is, notebook_first.py is created and the formats are set.

I noticed also that in the opposite direction there is no such problem. That is, if I start with a python file script_first.py, then running

jupytext --to notebook script_first.py 
jupytext --set-formats ipynb,py:percent script_first.ipynb

works as expected.

@mwouts
Copy link
Owner

mwouts commented Dec 14, 2019

Thank you @MPKonst for reporting this. I'll have a look soon!

@mwouts mwouts added this to the 1.3.1 milestone Dec 21, 2019
@mwouts
Copy link
Owner

mwouts commented Dec 26, 2019

At #407 we have one test that reproduces this, together with the fix. Thanks @MPKonst for your feedback!

@MPKonst
Copy link
Author

MPKonst commented Dec 29, 2019

Thanks for addressing this, Marc. Happy holidays!

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