-
Notifications
You must be signed in to change notification settings - Fork 571
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
raw json in nbconvert output #802
Comments
@jasongrout I think this is related to the widgets state getting embedded at the bottom of the HTML page. Possibly something needs to be HTML escaped. Can you take a look? |
I don't understand the request well enough to give a good answer The first line of the bad output in the html is
This seems to correspond to line 230 in the notebook. Possibly the problem is in the text/html field in the same JSON object, which is
I don't know if that helps. I should say that the notebook is not broken when run in Jupyter. It looks fine there but not in the html conversion. |
Maybe this is what you were asking for: on line 11895 of reproduce_plotly_err.html you can see the same string that comes at the top of the erroneous stuff at the bottom of the page.
right after |
@takluyver @jasongrout did you have any thoughts on this? Would be great to get a solution to it! |
See also spatialaudio/nbsphinx#183. |
So the JSON blob of widget state contains some HTML, which contains a I'm pretty sure that some kind of escaping is needed at some level, but I haven't figured out exactly what and where. I'm hoping that the widgets developers can investigate it. |
Is the smallest example to make nbconvert+html-manager not work. The state needs to be HTML escaped, and I think HTML manager needs to unescape. |
I converted the attached notebook as part of a sphinx build and got the attached html. As you can see there is a problem: the end of the html has a load of raw stuff from the nb printed out.
When I created the notebook, ran it and saved it I did not see this problem. Then I shut the notebook, reloaded it, ran it and saved again. At that point the error appeared. The part of the notebook at which the raw stuff begins starts after the string "Export to plot.ly" and around that point tere are a lot of escaped "s. But that is as far as I got diagnosing the problem. this issue is separate from the plot.ly output not appearing -- I'd consider it solved if there was no plot.ly output but the mess at the bottom of the page was gone.
error.zip
nbconvert (5.3.1)
Sphinx (1.7.0)
The text was updated successfully, but these errors were encountered: