-
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 >= 7.14 produces error in Sphinx build #2092
Comments
Hi @matteobachetti, to be clear, it works with 7.13.1? I don't see anything in the 7.14 release itself that looks relevant. |
Yep, you can see here that nbconvert fixed to <7.14 (it uses 7.13.1) does not produce the issue. But I'm not sure there are no other dependencies that are influenced by this. |
@blink1073 is there a way to debug this? If I could access the rst files produced by nbconvert, for example, I could look at exactly what lines are producing the raw directive. |
Unfortunately not, based on looking at spatialaudio/nbsphinx#620. What you can do is test the specific commits:
The commits we're interested in are:
|
We ran into this as well. I can't seem to replicate on my Mac, it only occurs in Linux containers in our CI system. We pin the requirements, so, modulo OS differences, I should have the same packages as the CI system. Example failing notebook: https://github.com/danking/hail/blob/update-deps/hail/python/hail/docs/tutorials/06-joins.ipynb The code we run follows, but I've updated the paths to make sense from the root of the Hail repository. The Makefile in hail/python/hail/docs is here.
I ran the code from #620 to generate RST from the ipynb and then copied that RST file into my docs and built the docs (on my Mac, which hasn't failed yet) and it seems to have built fine. The generated RST is here. I'm a bit at a loss about how to move forward. The log from a CI build showing the errors
|
Could things like this be an issue? I'd have expected the text to be indented. |
We had a similar problem come up over at XRTpy on this notebook and this other notebook, neither of which have any raw cells. The error happened on both This was the specific error that started showing up a bunch of times:
Thank you! |
spatialaudio/nbsphinx#620 (comment) shows how to get the intermediate reST representation. With an older .. raw:: text
0%| | 0/6 [00:00<?, ?it/s] With a newer When copy-pasting it here, it get's messed up in a similar way (but apparently the actual carriage return character doesn't survive copy-pasting): .. raw:: text
0%| | 0/6 [00:00<?, ?it/s] I'm not sure if Note that I have not executed the notebook, I have used the pre-executed "outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\r",
" 0%| | 0/6 [00:00<?, ?it/s]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"INFO: Calculating PDS model (update) [stingray.deadtime.model]\n"
]
}, |
Ok, so it seems a problem with outputs containing an advancement bar from |
Pin it to version 7.13 to avoid possible tqdm error, discussed in jupyter/nbconvert#2092 Maybe unrelated to weird tqdm outputs in notebook tutorials in the docs.
Pin it to version 7.13 to avoid possible tqdm error, discussed in jupyter/nbconvert#2092 Maybe unrelated to weird tqdm outputs in notebook tutorials in the docs.
Pin it to version 7.13 to avoid possible tqdm error, discussed in jupyter/nbconvert#2092 Maybe unrelated to weird tqdm outputs in notebook tutorials in the docs.
### What kind of change does this PR introduce? * Pins nbconvert to prevent the documentation from failing on build. ### Does this PR introduce a breaking change? No. ### Other information: jupyter/nbconvert#2092
This should fix the issue related to flushed values. See: - spatialaudio/nbsphinx#776 - jupyter/nbconvert#2092
@blink1073 wrote:
I used It would be great if the original coalescing behavior could be restored.
|
Thanks @mgeier! |
This should fix the issue related to flushed values. See: - spatialaudio/nbsphinx#776 - jupyter/nbconvert#2092
|
In Stingray, we build documentation from a bunch of rst files and a number of notebooks. It usually works quite well, but today I'm having errors like the ones in the build below:
https://github.com/StingraySoftware/stingray/actions/runs/7384306812/job/20086984844#step:8:511
The critical message is the following:
However, I don't know where this raw directive is, it's probably in the rst file that is being produced internally from the notebook.
The errors disappear if I fix the nbconvert version to <7.14.
Thanks in advance for any help
The text was updated successfully, but these errors were encountered: