
I have this piece of code:
from bokeh.embed import autoload_static
from bokeh.resources import CDN
script, tag = autoload_static(curdoc(),CDN,"bokeh_script.js")
with open("bokeh_script.js", "w") as f:
f.write(script)
html_content = f"""
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Bokeh Plot</title>
</head>
<body>
{tag}
</body>
</html>
"""
# Save the HTML file or serve it to a web browser
with open("bokeh.html", "w") as f:
f.write(html_content)
If i add this code to end of exaple app whitch does not contains teplates, for example crossfilter. It genaratets html that works.
But if i use dash example with teplates it reurns this error:
throw new Error(`Error rendering Bokeh model: could not find ${(0,
l.isString)(n) ? `#${n}` : n} HTML tag`);

