Hi all, and thanks for developing this great tool
What I’m trying to do
Embed a Bokeh plot on a Lektor website, i.e static website with Jinja2 templating.
I first used components
to do this, and then switched to the simpler HTML files approach when getting the error below, to make sure it wasn’t the fancier embedding that was causing the error. I used the examples on the website to implement it.
What didn’t work as expected
Once the Bokeh plot worked well on Jupyter, I executed:
output_file("my/path/gp-plot.html")
show(column(p1, p2, p3))
Then I simply added {% include "gp-plot.html" %}
in the HTML file where I want to display the plot.
But when trying to build the website, I get a weird jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'b'.
I’m aware that it may well not be a Bokeh issue, but wanted to get some pointers here, as I hope some people already encountered this error – and it appears only when embedding the plot’s script.
Good to know
The problem seems to come from the script
component: when using components
to embed, the site building worked when just the div
was present.
In case it helps, here is the end of the traceback:
File "/Users/alex_andorra/repos/pollsposition_website/templates/gp-plot.html", line 9, in template
I went and checked line 9 of the generated HTML file, but unfortunately that’s not very informative as it’s the huge part where all the plot’s data are
I’ve been at it for hours now and can’t figure it out – and I’ve found nothing useful on Google and no similar topics on this Discourse either (my apologies if there actually is such a question already).
Has anyone already encountered that by any chance?
Feel free to ask if anything is unclear, and thanks a lot in advance for your help!