-
Notifications
You must be signed in to change notification settings - Fork 574
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 4.2.0 and output in subdirectory #293
Comments
I'm also seeing this with 4.2.0 - nbconvert seems to be effectively changing working directory to the directory of the notebook(?) - so then the relative subdirectory path becomes invalid. As a quick workaround I'm simply passing nbconvert absolute paths. |
I encounter a similar bug. If you give a relative
By bisecting, I found the bug got introduced by commit dd84757. Or is this actually a feature? |
Arg, no, I think |
is this supposed to set This seems to be happening because even when you specify --output, the |
So I think that part of this actually isn't a bug. The flag for an output directory is supposed to be And So change
to
or even better
but note that if you try
the output will be to |
I don't get why there are two output parameters? Why can't we have only a single output parameter (e.g. --output) and rely on shell semantics for relative vs. absolute path handling? |
You can convert several notebooks with one command to a specified |
Ah — so should |
I agree with what Min said above that |
Not quite, though that was also something I was trying to work out. It looks like there are like three potential issues here. What I was asking was whether
I'm not sure where else the code determining whether there was a relative or an absolute path would be… It's not clear how the cited changes are able to mess with which directory the relative path is being defined from. It seems that the |
This seems to be related to problems reported in #326. |
Ok, so
So, it seems that it should never be used to specify a path. And so the fact that it had ever been possible was a mistake. Now I'll try to figure out where the resources path is getting set and see if i can set it relative to the working directory not the notebook directory |
Ok, so it seems that there was an explicit decision to make the relpath relative to the directory of the notebook and not the current working directory: e07ef9a#diff-0ede046bf81229fbf9277b1e4e652252 Additionally #341 suggests it should also be relative to the notebook. However, I'm taking this off of 5.0 because we need to come to a consensus around these definitions and expectations since they've sprung up organically and conflictingly. |
Rats, that does indeed look like we've got ourselves into a confusing corner. The |
I feel like we still don't have a consensus around this. |
I can't tell, is this still an issue? |
Specifying |
Has there been any update on this? It has been over a year and you still cannot reliably use nbconvert with subdirectories. Some formats need It should be consistent. And the most logical behavior is that it respects paths! |
Moving to 6.0 milestone as the entire build directory process should be considered in how it operates and changing it in 5.x would cause too much disruption. |
Hi,
nbconvert seems craching when trying to write ouput file in a subdirectory.
In the
notebook_test
directory I have one simple notebook filetest.ipynb
. The latter contains a single cell withprint("hello world")
.When converting to Markdown, nbconvert crashes:
However, it works perfectly when there is no subdirectory in the output filename:
pierre@kiwi> jupyter-nbconvert --to markdown ./notebook_test/test.ipynb --output test.md [NbConvertApp] Converting notebook ./notebook_test/test.ipynb to markdown [NbConvertApp] Writing 55 bytes to ./notebook_test/test.md
The funny thing is that the output file is also written in the same directory of the notebook file.
This does not appear with nbconvert 4.1.0.
I am not sure if this is a bug or a feature.
The text was updated successfully, but these errors were encountered: