Bokeh 2.0.1 server does not load using Apache2

Hi, I’m doing a simple website for a strong motion database. The preliminar version is available in and it uses Python 2.7 and Bokeh 1.1.

Now I want to update the different libraries before launching the site. Here I’m switching to Python 3.7 and Bokeh 1.4.0: I’m having issues with DatePickers, but that’s another topic.

I tried to use Bokeh to 2.0.1, however the website didn’t load correctly. I’ve found this error in Google Chrome:

Error: Error rendering Bokeh items: either 'docid' or 'sessionid' was expected.
at f (index.js:69)
at index.js:40

I don’t know anything about Apache, I used the example available in the documentation. However, I suppose that it is something related to the way you save the parameters docid or sessionid. Let me know if you need more information or where do you recommed me to start looking.

Thanks for your great work. Also I wanted to ask how should I cite this project?

The citation information is available at

Regarding the error - it sounds to me like the plots were not embedded correctly, and if so, it has nothing to do with Apache.
Is there source code available? Can you try running the app locally, without Apache?

I can share the code but it can’t be reproduced because you need some libraries that we wrote. Instead, I did a “minimum working example” with the same structure of our website (it’s not that small haha). You can download here:

I used this MWE with Bokeh 2.0.1 locally (i.e., localhost:5006) and it works. However, when I try to see it online, the same error as before appears. This is not the case with Bokeh 1.4.0, where both scenarios (local and with apache) work.

@sebacastroh it’s not the Bokeh app code that is the issue (as you note, you can run it locally just fine) but rather something to do either with how you are embedding it in the other web app/page that you are embedding it, or possibly to do with the Apache configuration, or a Python/JS version mismatch. Those are the things that we would need more information about. At a minimum you could host a (broken) version with 2.0.1 so that the page source and network loads can be examined.

Are you sure you are loading the correct version of BokehJS to match the Python version? E.g. if you
have you copied BokehJS sources to some separate static handler for your main webapp, have you forgotten to update them to be version 2.0.1?

I updated the static folder as you told me, but nothing changed. In I’m hosting the broken version. As you can see, it loads the html template, but when the bokeh part should start, it fails.

Thanks for all your help!

Have you already fixed it? Because I see the page just fine, it seems.

No, I haven’t. Maybe is the cache, let me clear my data

EDIT: Yes, it’s working! Thank you