Closed jlstevens closed 4 years ago
This is likely not actually a new issue but affects more output now because since that PR more objects are rendered with the HTML pane. Internally the HTML model uses the DOMParser to parse the HTML that is being rendered which is necessary to safely instantiate script tags for instance. The problem with that is that PhantomJS does not support parsing HTML using the DOMParser so you get an error like this:
WARNING:bokeh.io.export:TypeError: null is not an object (evaluating '(new DOMParser).parseFromString(e,"text/html").documentElement')
There's two possible fixes, during static png export we can simply swap out the HTML bokeh model for the Div bokeh model which will render the majority of content. Even if we do nothing though this will just work when bokeh 2.0 is released which uses chromedriver instead of PhantomJS.
Given that bokeh 2 is python 3 only, I think we should fix this in a bugfix release now, before depending on bokeh 2
The
.save
method to export to.png
doesn't seem to be working right now in panel 0.8, at least for some layouts.Steps to reproduce are the same as in #1077 with a few extra steps (note, these issues aren't related otherwise!):
cd attractors
anaconda-project prepare
(you needanaconda-project
installed)conda activate envs/default
conda install -c pyviz panel=0.8 bokeh=1.4
jupyter notebook
and runattractors_panel.ipynb
handle.save('image.png')
Traceback:
I ran
git bisect
to tracks the issue down to this commit: