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

jupytext.read needs to check format is not none before updating fmt #312

Closed
Wilsontomass opened this issue Aug 14, 2019 · 1 comment
Closed
Milestone

Comments

@Wilsontomass
Copy link

Wilsontomass commented Aug 14, 2019

As of now if you pass a file path in string form to jupytext.read() it does not convert the format with jupytext.formats.long_form_one_format() before attempting to call fmt.update(), which will be a string, and raise an AttributeError. Changing the order of if statements should solve this

@mwouts
Copy link
Owner

mwouts commented Aug 14, 2019

Hello @Wilsontomass , I won't be available to investigate this before early September. But this sounds both interesting and easy to fix.

Maybe in the mean time you would like to contribute the suggested fix, together with an additional test (maybe in a file named tests/test_jupytext_read.py) that would call the read function in the way you would expect it to work?

@mwouts mwouts added this to the 1.2.2 milestone Aug 30, 2019
@mwouts mwouts closed this as completed in 8ebf94b Sep 1, 2019
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