rendering problem when embedding bokeh server app in 0.12

Hi,

We use autoload_server to embed a bokeh server app in a Flask app.

It was working in 0.11.1 but it doesn’t render properly in 0.12.0.

I made a very simple example to reproduce the problem:

app.py

from flask import Flask, render_template
from bokeh.embed import autoload_server

app = Flask(name)

@app.route(’/’)
def index():
script = autoload_server(model=None, app_path="/sliders")
return render_template(‘index.html’, bokeh_script=script)

``

templates/index.html

Bokeh app test

{{ bokeh_script|safe }}

``

I use the sliders.py example from bokeh/examples/app:
bokeh serve --host localhost:5000 --host localhost:5006 sliders.py

``

It renders fine with bokeh 0.11.1 but not in 0.12.0. See screenshots below.

Note that when going directly to localhost:5006/sliders, the sliders app looks fine.

Is there something specific to do in 0.12.0 to embed an app?

Thanks

Benjamin

This seems like it might be a regression, or perhaps a migration issue we failed to catch. Can you make a GH issue? I will see if I can figure out a root cause very soon.

Bryan

···

On Jun 29, 2016, at 7:33 AM, [email protected] wrote:

Hi,

We use autoload_server to embed a bokeh server app in a Flask app.
It was working in 0.11.1 but it doesn't render properly in 0.12.0.

I made a very simple example to reproduce the problem:

app.py
from flask import Flask, render_template
from bokeh.embed import autoload_server

app = Flask(__name__)

@app.route('/')
def index():
    script = autoload_server(model=None, app_path="/sliders")
    return render_template('index.html', bokeh_script=script)

templates/index.html
<!DOCTYPE html>
<html lang="en">

  <body>
    <h1>Bokeh app test</h1>
    <div class="bokeh_app">
      {{ bokeh_script|safe }}
    </div>
  </body>

</html>

I use the sliders.py example from bokeh/examples/app:
bokeh serve --host localhost:5000 --host localhost:5006 sliders.py

It renders fine with bokeh 0.11.1 but not in 0.12.0. See screenshots below.
Note that when going directly to localhost:5006/sliders, the sliders app looks fine.

Is there something specific to do in 0.12.0 to embed an app?

Thanks

Benjamin

--
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/c5603398-d984-491d-bd83-01e8a98bfbf6%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

I created this issue: https://github.com/bokeh/bokeh/issues/4693

Thanks

···

Le mercredi 29 juin 2016 13:50:26 UTC, Bryan Van de ven a écrit :

This seems like it might be a regression, or perhaps a migration issue we failed to catch. Can you make a GH issue? I will see if I can figure out a root cause very soon.

Bryan

On Jun 29, 2016, at 7:33 AM, [email protected] wrote:

Hi,

We use autoload_server to embed a bokeh server app in a Flask app.

It was working in 0.11.1 but it doesn’t render properly in 0.12.0.

I made a very simple example to reproduce the problem:

app.py

from flask import Flask, render_template

from bokeh.embed import autoload_server

app = Flask(name)

@app.route(’/’)

def index():

script = autoload_server(model=None, app_path="/sliders")
return render_template('index.html', bokeh_script=script)

templates/index.html

<h1>Bokeh app test</h1>
<div class="bokeh_app">
  {{ bokeh_script|safe }}
</div>

I use the sliders.py example from bokeh/examples/app:

bokeh serve --host localhost:5000 --host localhost:5006 sliders.py

It renders fine with bokeh 0.11.1 but not in 0.12.0. See screenshots below.

Note that when going directly to localhost:5006/sliders, the sliders app looks fine.

Is there something specific to do in 0.12.0 to embed an app?

Thanks

Benjamin


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/c5603398-d984-491d-bd83-01e8a98bfbf6%40continuum.io.

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

A PR for this has been merged. I intend to have a very small 0.12.1 bugfix release soon, and a dev build early next week as well The fix will be included in those.

Thanks,

Bryan

···

On Jun 29, 2016, at 9:53 AM, [email protected] wrote:

I created this issue: https://github.com/bokeh/bokeh/issues/4693

Thanks

Le mercredi 29 juin 2016 13:50:26 UTC, Bryan Van de ven a écrit :
This seems like it might be a regression, or perhaps a migration issue we failed to catch. Can you make a GH issue? I will see if I can figure out a root cause very soon.

Bryan

> On Jun 29, 2016, at 7:33 AM, [email protected] wrote:
>
> Hi,
>
> We use autoload_server to embed a bokeh server app in a Flask app.
> It was working in 0.11.1 but it doesn't render properly in 0.12.0.
>
> I made a very simple example to reproduce the problem:
>
> app.py
> from flask import Flask, render_template
> from bokeh.embed import autoload_server
>
> app = Flask(__name__)
>
>
> @app.route('/')
> def index():
> script = autoload_server(model=None, app_path="/sliders")
> return render_template('index.html', bokeh_script=script)
>
> templates/index.html
> <!DOCTYPE html>
> <html lang="en">
>
> <body>
> <h1>Bokeh app test</h1>
> <div class="bokeh_app">
> {{ bokeh_script|safe }}
> </div>
> </body>
>
> </html>
>
> I use the sliders.py example from bokeh/examples/app:
> bokeh serve --host localhost:5000 --host localhost:5006 sliders.py
>
> It renders fine with bokeh 0.11.1 but not in 0.12.0. See screenshots below.
> Note that when going directly to localhost:5006/sliders, the sliders app looks fine.
>
> Is there something specific to do in 0.12.0 to embed an app?
>
>
> Thanks
>
> Benjamin
>
>
>
>
>
>
>
>
>
> --
> 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/c5603398-d984-491d-bd83-01e8a98bfbf6%40continuum.io.
> For more options, visit https://groups.google.com/a/continuum.io/d/optout.

--
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/9520e9aa-f21c-4c9b-a893-daeb9e93a0a3%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.