question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

embed/animated fails with "did not find model"

See original GitHub issue

Error rendering Bokeh items Error: Did not find model ID_HERE in session.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jarittcommented, Oct 31, 2016

Just in case it helps:

I encountered the same error when using the embedded feature with server data (see http://bokeh.pydata.org/en/latest/docs/user_guide/embed.html#server-data). I used the exact example, which says that figure() auto adds the figure to curdoc(). On loading the generated Javascript, I got that error. However it worked fine, once I added the plot to curdoc manually:

from bokeh.client import push_session
from bokeh.embed import autoload_server
from bokeh.plotting import figure, curdoc

# Apparently figure() doesnt auto add the plot to curdoc()
plot = figure(title="Linegraph", plot_width=300, plot_height=300)
plot.line(x=[1,2,3,4,5], y=[3,2,3,4,2])

# THIS LINE FIXED IT:
curdoc().add_root(plot)

session = push_session(curdoc())
script = autoload_server(plot, session_id=session.id)

# Just writing the html file
f = open("index.html", "w")
pre = "<!DOCTYPE HTML><html><head></head><body><p>Plot here:</p>"
post = "</body></html>"
f.write(pre + script + post)
f.close
0reactions
bryevdvcommented, Oct 31, 2016

Yes, a trivial fix I pushed a PR

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to embed animated svg file on WordPress website
So the solution was in the SVG file. The way it was exported, it had a script in it, which wasnt running. I...
Read more >
Is it possible to embed animated GIFs in PDFs? - Quora
So no. If you insert a GIF, it simply will stay at the first frame when exported to PDF.
Read more >
Separating Fact from Fiction: An Empirical Examination of Six ...
Researchers have found dissociation and dissociative disorders around the world. ... Thus, according to the fantasy model proponents, DID is not a valid ......
Read more >
Embed animated gif in dialog/window - Macro Scheduler
The animated GIF is intended to let the user know that something is happening. We didn't just go into a tailspin and crash...
Read more >
How to embed animated .gifs on your Facebook Timeline
Here are two ways to easily post an animated gif to Facebook: ... For those of you who don't know this, animated .GIF...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found