0.12.11 Bokeh Server Problem -- could it be old static files?

I upgraded my Bokeh version from 0.12.9 to 0.12.11 and I get this message when trying to call the slider.py app hosted by the bokeh server:

x

Bokeh Error

JSON object has wrong type string

I’m running a Django = 1.11.5 website with Bokeh Server = 0.12.11.

It worked in 0.12.9. It did not work in 0.12.10 due to a known issue with external-signed certificates (I believe.)

So I was anxious to try it on 0.12.11 to get to the latest version.

You can re-create everything I’m doing at:

https://konoanalytics.solutions/dynamic_3

When I look at the html source, I see a link to the javascript generated by the bokeh server:

When I look at the javascript I see several references to my static directory on my web application:

var js_urls = [“https://konoanalytics.solutions/static/js/bokeh.min.js?v=7b3c503af12722a870572ee45aeda7c6”, “https://konoanalytics.solutions/static/js/bokeh-widgets.min.js?v=660c13cbf9d52e2454c003071aaa88af”, “https://konoanalytics.solutions/static/js/bokeh-tables.min.js?v=ae194c33052a7566873d4eb89c6a3822”, “https://konoanalytics.solutions/static/js/bokeh-gl.min.js?v=de5005ce67c20a5a250d429cb2a42a50”];

and

      function(Bokeh) {
console.log("Bokeh: injecting CSS: https://konoanalytics.solutions/static/css/bokeh.min.css?v=06206b4cbc8ea56b6016931bd1976f7f");
Bokeh.embed.inject_css("https://konoanalytics.solutions/static/css/bokeh.min.css?v=06206b4cbc8ea56b6016931bd1976f7f");
console.log("Bokeh: injecting CSS: https://konoanalytics.solutions/static/css/bokeh-widgets.min.css?v=509e292d9a7ef7e9eb8382fcde7b4a6e");
Bokeh.embed.inject_css("https://konoanalytics.solutions/static/css/bokeh-widgets.min.css?v=509e292d9a7ef7e9eb8382fcde7b4a6e");
console.log("Bokeh: injecting CSS: https://konoanalytics.solutions/static/css/bokeh-tables.min.css?v=aa783ffa4e290813a295a99cce2f8b5d");
Bokeh.embed.inject_css("https://konoanalytics.solutions/static/css/bokeh-tables.min.css?v=aa783ffa4e290813a295a99cce2f8b5d");
}

Questions:
1) What is going on in the slider.py file that causes it to create a javascript that refers to my static directory?
2) Is the problem that my static files are old (version 0.12.9 or possibly even older) that's causing my problems? If so, how could/should I point to the hosted files? (http://cdn.pydata.org/bokeh/release/bokeh-0.12.11.min.js for example)
3) If I'm totally off base with the static files causing this problem, what else should I be looking at?

Hi,

Bokeh apps don't normally load BokehJS from CDN. To ensure that things line up exactly, Bokeh server apps load BokehJS directly from the Bokeh server by default. If you have the app behind a proxy, say with public address, foo.com then I would expect the app to load BokehJS from foo.com/static. So the URLS you see do not seem unexpected, offhand. That said, if I try to look at:

  https://konoanalytics.solutions/static/js/bokeh.min.js

Then it actually brings the the Bokeh CSS not bokeh.min.js so there does seem to be something amiss with your configuration? I've never seen anything like this and without knowing more details of your network and proxy config I can't really speculate. Additionally if I look at the unmagnified file:

  https://konoanalytics.solutions/static/js/bokeh.js

I see that it is in fact the old 0.12.9 version which would definitely always fail. Currently the python and SJ versions need to match exactly. I'm guessing you have a proxy set up to redirect static links so that the proxy can serve static content and lift that burden from the bokeh server? Then a solution would be to update those files appropriately. Again, I can't really speculate without knowing much more about your actual web app deploy configuration. Absent that, you might look at the deploy configuration for demo.bokehplots.com for something to model after:

  GitHub - bokeh/demo.bokeh.org: Hosted Bokeh App Demos

Thanks,

Bryan

···

On Dec 4, 2017, at 11:26, Jonathan Bennett <[email protected]> wrote:

I upgraded my Bokeh version from 0.12.9 to 0.12.11 and I get this message when trying to call the slider.py app hosted by the bokeh server:

x
Bokeh Error

JSON object has wrong type string

I'm running a Django = 1.11.5 website with Bokeh Server = 0.12.11.
It worked in 0.12.9. It did not work in 0.12.10 due to a known issue with external-signed certificates (I believe.)
So I was anxious to try it on 0.12.11 to get to the latest version.

You can re-create everything I'm doing at:
Kono Analytics

When I look at the html source, I see a link to the javascript generated by the bokeh server:

<script
    src="https://konoanalytics.solutions/bokehproxy/bokeh_server_viz3/autoload.js?bokeh-autoload-element=98c7ebf5-1766-44e1-b9e7-20a3c58bc411&bokeh-app-path=/bokehproxy/bokeh_server_viz3&bokeh-absolute-url=https://konoanalytics.solutions/bokehproxy/bokeh_server_viz3&bokeh-session-id=bCVQuqvWntTsGzPZJq8jodZiBYxAxkUEsINM3vd0eli8-xhPwFBtC_WFUlSw0aaqfW-vH8ZmSUZv7GUN_WBVwr7k&quot;
    id="98c7ebf5-1766-44e1-b9e7-20a3c58bc411"
    data-bokeh-model-id=""
    data-bokeh-doc-id=""
></script>

When I look at the javascript I see several references to my static directory on my web application:

var js_urls = ["https://konoanalytics.solutions/static/js/bokeh.min.js?v=7b3c503af12722a870572ee45aeda7c6&quot;, "https://konoanalytics.solutions/static/js/bokeh-widgets.min.js?v=660c13cbf9d52e2454c003071aaa88af&quot;, "https://konoanalytics.solutions/static/js/bokeh-tables.min.js?v=ae194c33052a7566873d4eb89c6a3822&quot;, "https://konoanalytics.solutions/static/js/bokeh-gl.min.js?v=de5005ce67c20a5a250d429cb2a42a50&quot;\];

and

    function(Bokeh) {
      console.log("Bokeh: injecting CSS: https://konoanalytics.solutions/static/css/bokeh.min.css?v=06206b4cbc8ea56b6016931bd1976f7f&quot;\);
      Bokeh.embed.inject_css("https://konoanalytics.solutions/static/css/bokeh.min.css?v=06206b4cbc8ea56b6016931bd1976f7f&quot;\);
      console.log("Bokeh: injecting CSS: https://konoanalytics.solutions/static/css/bokeh-widgets.min.css?v=509e292d9a7ef7e9eb8382fcde7b4a6e&quot;\);
      Bokeh.embed.inject_css("https://konoanalytics.solutions/static/css/bokeh-widgets.min.css?v=509e292d9a7ef7e9eb8382fcde7b4a6e&quot;\);
      console.log("Bokeh: injecting CSS: https://konoanalytics.solutions/static/css/bokeh-tables.min.css?v=aa783ffa4e290813a295a99cce2f8b5d&quot;\);
      Bokeh.embed.inject_css("https://konoanalytics.solutions/static/css/bokeh-tables.min.css?v=aa783ffa4e290813a295a99cce2f8b5d&quot;\);
    }

Questions:
1) What is going on in the slider.py file that causes it to create a javascript that refers to my static directory?
2) Is the problem that my static files are old (version 0.12.9 or possibly even older) that's causing my problems? If so, how could/should I point to the hosted files? (http://cdn.pydata.org/bokeh/release/bokeh-0.12.11.min.js for example)
3) If I'm totally off base with the static files causing this problem, what else should I be looking at?

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/506f5ad5-1636-4415-977f-f0a9a1528db5%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

That said, if I try to look at: https://konoanalytics.solutions/static/js/bokeh.min.js Then it actually brings the the Bokeh CSS not bokeh.min.js so there does seem to be something amiss with your configuration?"
That was my mistake . . . I was debugging and pasted the wrong info into the file temporarily

I fixed it, thanks to your help.

I guess I didn’t understand that bokeh server pulled from those static files. But I updated them and it works now.

Thanks again!

···

On Mon, Dec 4, 2017 at 11:42 AM, Bryan Van de ven [email protected] wrote:

Hi,

Bokeh apps don’t normally load BokehJS from CDN. To ensure that things line up exactly, Bokeh server apps load BokehJS directly from the Bokeh server by default. If you have the app behind a proxy, say with public address, foo.com then I would expect the app to load BokehJS from foo.com/static. So the URLS you see do not seem unexpected, offhand. That said, if I try to look at:

    [https://konoanalytics.solutions/static/js/bokeh.min.js](https://konoanalytics.solutions/static/js/bokeh.min.js)

Then it actually brings the the Bokeh CSS not bokeh.min.js so there does seem to be something amiss with your configuration? I’ve never seen anything like this and without knowing more details of your network and proxy config I can’t really speculate. Additionally if I look at the unmagnified file:

    [https://konoanalytics.solutions/static/js/bokeh.js](https://konoanalytics.solutions/static/js/bokeh.js)

I see that it is in fact the old 0.12.9 version which would definitely always fail. Currently the python and SJ versions need to match exactly. I’m guessing you have a proxy set up to redirect static links so that the proxy can serve static content and lift that burden from the bokeh server? Then a solution would be to update those files appropriately. Again, I can’t really speculate without knowing much more about your actual web app deploy configuration. Absent that, you might look at the deploy configuration for demo.bokehplots.com for something to model after:

    [https://github.com/bokeh/demo.bokehplots.com](https://github.com/bokeh/demo.bokehplots.com)

Thanks,

Bryan

On Dec 4, 2017, at 11:26, Jonathan Bennett [email protected] wrote:

I upgraded my Bokeh version from 0.12.9 to 0.12.11 and I get this message when trying to call the slider.py app hosted by the bokeh server:

x

Bokeh Error

JSON object has wrong type string

I’m running a Django = 1.11.5 website with Bokeh Server = 0.12.11.

It worked in 0.12.9. It did not work in 0.12.10 due to a known issue with external-signed certificates (I believe.)

So I was anxious to try it on 0.12.11 to get to the latest version.

You can re-create everything I’m doing at:

https://konoanalytics.solutions/dynamic_3

When I look at the html source, I see a link to the javascript generated by the bokeh server:

<script
src="[https://konoanalytics.solutions/bokehproxy/bokeh_server_viz3/autoload.js?bokeh-autoload-element=98c7ebf5-1766-44e1-b9e7-20a3c58bc411&bokeh-app-path=/bokehproxy/bokeh_server_viz3&bokeh-absolute-url=https://konoanalytics.solutions/bokehproxy/bokeh_server_viz3&bokeh-session-id=bCVQuqvWntTsGzPZJq8jodZiBYxAxkUEsINM3vd0eli8-xhPwFBtC_WFUlSw0aaqfW-vH8ZmSUZv7GUN_WBVwr7k](https://konoanalytics.solutions/bokehproxy/bokeh_server_viz3/autoload.js?bokeh-autoload-element=98c7ebf5-1766-44e1-b9e7-20a3c58bc411&bokeh-app-path=/bokehproxy/bokeh_server_viz3&bokeh-absolute-url=https://konoanalytics.solutions/bokehproxy/bokeh_server_viz3&bokeh-session-id=bCVQuqvWntTsGzPZJq8jodZiBYxAxkUEsINM3vd0eli8-xhPwFBtC_WFUlSw0aaqfW-vH8ZmSUZv7GUN_WBVwr7k)"
id="98c7ebf5-1766-44e1-b9e7-20a3c58bc411"
data-bokeh-model-id=""
data-bokeh-doc-id=""

When I look at the javascript I see several references to my static directory on my web application:

var js_urls = [“https://konoanalytics.solutions/static/js/bokeh.min.js?v=7b3c503af12722a870572ee45aeda7c6”, “https://konoanalytics.solutions/static/js/bokeh-widgets.min.js?v=660c13cbf9d52e2454c003071aaa88af”, “https://konoanalytics.solutions/static/js/bokeh-tables.min.js?v=ae194c33052a7566873d4eb89c6a3822”, “https://konoanalytics.solutions/static/js/bokeh-gl.min.js?v=de5005ce67c20a5a250d429cb2a42a50”];

and

function(Bokeh) {
  console.log("Bokeh: injecting CSS: [https://konoanalytics.solutions/static/css/bokeh.min.css?v=06206b4cbc8ea56b6016931bd1976f7f](https://konoanalytics.solutions/static/css/bokeh.min.css?v=06206b4cbc8ea56b6016931bd1976f7f)");
  Bokeh.embed.inject_css("[https://konoanalytics.solutions/static/css/bokeh.min.css?v=06206b4cbc8ea56b6016931bd1976f7f](https://konoanalytics.solutions/static/css/bokeh.min.css?v=06206b4cbc8ea56b6016931bd1976f7f)");
  console.log("Bokeh: injecting CSS: [https://konoanalytics.solutions/static/css/bokeh-widgets.min.css?v=509e292d9a7ef7e9eb8382fcde7b4a6e](https://konoanalytics.solutions/static/css/bokeh-widgets.min.css?v=509e292d9a7ef7e9eb8382fcde7b4a6e)");
  Bokeh.embed.inject_css("[https://konoanalytics.solutions/static/css/bokeh-widgets.min.css?v=509e292d9a7ef7e9eb8382fcde7b4a6e](https://konoanalytics.solutions/static/css/bokeh-widgets.min.css?v=509e292d9a7ef7e9eb8382fcde7b4a6e)");
  console.log("Bokeh: injecting CSS: [https://konoanalytics.solutions/static/css/bokeh-tables.min.css?v=aa783ffa4e290813a295a99cce2f8b5d](https://konoanalytics.solutions/static/css/bokeh-tables.min.css?v=aa783ffa4e290813a295a99cce2f8b5d)");
  Bokeh.embed.inject_css("[https://konoanalytics.solutions/static/css/bokeh-tables.min.css?v=aa783ffa4e290813a295a99cce2f8b5d](https://konoanalytics.solutions/static/css/bokeh-tables.min.css?v=aa783ffa4e290813a295a99cce2f8b5d)");
}

Questions:

  1. What is going on in the slider.py file that causes it to create a javascript that refers to my static directory?
  1. Is the problem that my static files are old (version 0.12.9 or possibly even older) that’s causing my problems? If so, how could/should I point to the hosted files? (http://cdn.pydata.org/bokeh/release/bokeh-0.12.11.min.js for example)
  1. If I’m totally off base with the static files causing this problem, what else should I be looking at?

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/506f5ad5-1636-4415-977f-f0a9a1528db5%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

You received this message because you are subscribed to a topic in the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/l4rIoTim8Tk/unsubscribe.

To unsubscribe from this group and all its topics, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/BB8BA915-6746-49F2-A6E8-F37CEB1F6A66%40anaconda.com.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Jonathan Bennett
Kono Analytics
p:
713.489.4338
w:
konoanalytics.com