-
Notifications
You must be signed in to change notification settings - Fork 565
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
nbconvert --to notebook --output out.ipynb filename incorrect #1970
Comments
Gentle ping since our (for me, matplotlib, but others who have linked PRs here as well) current workaround is to avoid the versions with the change, and the new release today means we have to update that. If this is intended behavior that will be kept going forward, knowing that would be appreciated so we can implement a more complete workaround. |
I agree with @ksunden. We would appreciate it and be grateful if the team could share if saving to |
This looks like unintended behavior to me, since the PR that made the change didn't test notebook files. I made a PR to restore old behavior, hopefully a maintainer can take a look at it soon. |
Recent failures of roottest-python-JupyROOT-importROOT_notebook (specifically on Fedora 37) would report the message ``` [NbConvertApp] Converting notebook importROOT.ipynb to notebook [NbConvertApp] Writing 988 bytes to importROOT_out.nbconvert.ipynb ... File "/tmp/workspace/src/roottest/python/JupyROOT/nbdiff.py", line 68, in getFilteredLines filteredLines = list(filter(customLineJunkFilter, open(fileName).readlines())) ^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'importROOT_out.ipynb' ``` This is due to a bug in nbconvert version 7.3, as described in jupyter/nbconvert#1970. Other versions of the package do not suffer from the bug, so we update the requirements.txt file accordingly.
Recent failures of roottest-python-JupyROOT-importROOT_notebook (specifically on Fedora 37) would report the message ``` [NbConvertApp] Converting notebook importROOT.ipynb to notebook [NbConvertApp] Writing 988 bytes to importROOT_out.nbconvert.ipynb ... File "/tmp/workspace/src/roottest/python/JupyROOT/nbdiff.py", line 68, in getFilteredLines filteredLines = list(filter(customLineJunkFilter, open(fileName).readlines())) ^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'importROOT_out.ipynb' ``` This is due to a bug in nbconvert version 7.3, as described in jupyter/nbconvert#1970. Other versions of the package do not suffer from the bug, so we update the requirements.txt file accordingly.
Outputs to a file called "out.nbconvert.ipynb" instead of "out.ipynb" as expected.
The expected behavior was the case prior to v7.3, likely related to #1967, though not super obvious how this behavior emerges, looking at the diff as an outsider to this codebase.
My guess is that it is related to stripping the extension off there.
A similar change does not seem to happen for other conversions, e.g.
md
orpdf
Steps to reproduce:
Any ipynb will do, I just made a new, empty, ipynb file and called it "test.ipynb"
This is currently breaking matplotlib's tests, which rely on the expected output path being valid.
The text was updated successfully, but these errors were encountered: