issues with flask, bokeh server, session id and url passing

I am pulling all my hair out configuring a flask based site, embedding bokeh apps and imposing a session ID using BOKEH_SECRET_KEY and BOKEH_SIGN_SESSIONS. The signed session IDs work fine when I go straight to the app page server by the bokeh server like so: 127.0.0.1:5100/myapp

But I am not having much luck with passing the page link along with the signed session id inside a flask template. Let me explain. Below is the decorator in my flask code:

@app.route(‘/myapp’)
@requires_auth
def myapp():
s_id = session_id.generate_session_id()
#return redirect(“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id), code=302)
print (“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id))
script = server_document(“http://127.0.0.1:5100/domeProfile?bokeh-session-id={}”.format(s_id))
return render_template(“myapp.html”, script = script)

``

As you can see I am printing the URL that is passed to the flask template, myapp.html for diiagnostics. The URL printed :

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98

is good to go and I can see the link in browser for the app. However the actual flask page at 127.0.0.1:5000/myapp shows the navbar etc, but content is blank where the bokeh app is supposed to load. The intention is for the template to show the bokeh app using {{ script|safe }}. When I check the page source in the rendered page of 127.0.0.1:5000/myapp, I see that the link generated is like this:

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98/autoload.js?bokeh-autoload-element=1001&bokeh-app-path=/domeProfile&bokeh-absolute-url=http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98"

id=“1001”

which explains why the content is blank. What is all the extra stuff being added to the link I am passing? This autoload.js stuff is beyond me. How can I pass the link to the flask template in its pure form and avoid the extra stuff tagged on?

What’s the command you are using to run the Bokeh app? Are you using: bokeh serve bokeh_app.py --allow-websocket-origin=localhost:5000 ?

···

On Tuesday, January 1, 2019 at 1:24:09 PM UTC-5, Kaushik Mallick wrote:

I am pulling all my hair out configuring a flask based site, embedding bokeh apps and imposing a session ID using BOKEH_SECRET_KEY and BOKEH_SIGN_SESSIONS. The signed session IDs work fine when I go straight to the app page server by the bokeh server like so: 127.0.0.1:5100/myapp

But I am not having much luck with passing the page link along with the signed session id inside a flask template. Let me explain. Below is the decorator in my flask code:

@app.route(‘/myapp’)
@requires_auth
def myapp():
s_id = session_id.generate_session_id()
#return redirect(“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id), code=302)
print (“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id))
script = server_document(“http://127.0.0.1:5100/domeProfile?bokeh-session-id={}”.format(s_id))
return render_template(“myapp.html”, script = script)

``

As you can see I am printing the URL that is passed to the flask template, myapp.html for diiagnostics. The URL printed :

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98

is good to go and I can see the link in browser for the app. However the actual flask page at 127.0.0.1:5000/myapp shows the navbar etc, but content is blank where the bokeh app is supposed to load. The intention is for the template to show the bokeh app using {{ script|safe }}. When I check the page source in the rendered page of 127.0.0.1:5000/myapp, I see that the link generated is like this:

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98/autoload.js?bokeh-autoload-element=1001&bokeh-app-path=/domeProfile&bokeh-absolute-url=http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98 "

id=“1001”

which explains why the content is blank. What is all the extra stuff being added to the link I am passing? This autoload.js stuff is beyond me. How can I pass the link to the flask template in its pure form and avoid the extra stuff tagged on?

Hi,

All the "extra stuff" is added by Bokeh, and is required in order to properly embed a Bokeh app. There is no way to avoid it, unless you want to embed using an IFrame, instead of server_document.

In any case, your problem is that you are trying to add "?bokeh-session-id=" yourself, by hand. You should not do this, and do not need to. As you can see in the link that is generated, Bokeh already adds that automatically, as part of the "extra stuff". Just leave that off.

If you do need to add your own custom HTML args (you don't here, but just FYI) you must do that by passing a key/value dict for the "arguments" parameter to server_document:

  https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document

That will ensure that they are formatted correctly.

Thanks,

Bryan

···

On Jan 1, 2019, at 10:24, [email protected] wrote:

I am pulling all my hair out configuring a flask based site, embedding bokeh apps and imposing a session ID using BOKEH_SECRET_KEY and BOKEH_SIGN_SESSIONS. The signed session IDs work fine when I go straight to the app page server by the bokeh server like so: 127.0.0.1:5100/myapp

But I am not having much luck with passing the page link along with the signed session id inside a flask template. Let me explain. Below is the decorator in my flask code:

@app.route('/myapp')
@requires_auth
def myapp():
    s_id = session_id.generate_session_id()
    #return redirect("http://127.0.0.1:5100/myapp?bokeh-session-id={}“.format(s_id), code=302)
    print ("http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id))
    script = server_document("http://127.0.0.1:5100/domeProfile?bokeh-session-id={}".format(s_id))
    return render_template("myapp.html", script = script)

As you can see I am printing the URL that is passed to the flask template, myapp.html for diiagnostics. The URL printed :

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98

is good to go and I can see the link in browser for the app. However the actual flask page at 127.0.0.1:5000/myapp shows the navbar etc, but content is blank where the bokeh app is supposed to load. The intention is for the template to show the bokeh app using {{ script|safe }}. When I check the page source in the rendered page of 127.0.0.1:5000/myapp, I see that the link generated is like this:

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98/autoload.js?bokeh-autoload-element=1001&bokeh-app-path=/domeProfile&bokeh-absolute-url=http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98" id="1001"

which explains why the content is blank. What is all the extra stuff being added to the link I am passing? This autoload.js stuff is beyond me. How can I pass the link to the flask template in its pure form and avoid the extra stuff tagged on?

--
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/f2daeba1-17bb-4b05-aa79-6ff723ddda99%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

This is what I am using to run my bokeh server:

···

bokeh serve myapp --session-ids external-signed --port 5100 --allow-websocket-origin=‘*’

On Wednesday, January 2, 2019 at 12:39:28 AM UTC, Shadi G wrote:

I am pulling all my hair out configuring a flask based site, embedding bokeh apps and imposing a session ID using BOKEH_SECRET_KEY and BOKEH_SIGN_SESSIONS. The signed session IDs work fine when I go straight to the app page server by the bokeh server like so: 127.0.0.1:5100/myapp

But I am not having much luck with passing the page link along with the signed session id inside a flask template. Let me explain. Below is the decorator in my flask code:

@app.route(‘/myapp’)
@requires_auth
def myapp():
s_id = session_id.generate_session_id()
#return redirect(“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id), code=302)
print (“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id))
script = server_document(“http://127.0.0.1:5100/domeProfile?bokeh-session-id={}”.format(s_id))
return render_template(“myapp.html”, script = script)

``

As you can see I am printing the URL that is passed to the flask template, myapp.html for diiagnostics. The URL printed :

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98

is good to go and I can see the link in browser for the app. However the actual flask page at 127.0.0.1:5000/myapp shows the navbar etc, but content is blank where the bokeh app is supposed to load. The intention is for the template to show the bokeh app using {{ script|safe }}. When I check the page source in the rendered page of 127.0.0.1:5000/myapp, I see that the link generated is like this:

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98/autoload.js?bokeh-autoload-element=1001&bokeh-app-path=/domeProfile&bokeh-absolute-url=http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98 "

id=“1001”

which explains why the content is blank. What is all the extra stuff being added to the link I am passing? This autoload.js stuff is beyond me. How can I pass the link to the flask template in its pure form and avoid the extra stuff tagged on?

What’s the command you are using to run the Bokeh app? Are you using: bokeh serve bokeh_app.py --allow-websocket-origin=localhost:5000 ?

On Tuesday, January 1, 2019 at 1:24:09 PM UTC-5, Kaushik Mallick wrote:

Thanks for your help. Just to clarify, I am not adding anything by hand. I am relying on the communication between flask server and bokeh server and the session ids that they share. Both servers share the same environment variables of BOKEH_SECRET_KEY = ‘blahblahblah’ and BOKEH_SIGN_SESSIONS=True.

Hence my frustration. The two servers can talk to each other if the flask server runs native python app to authenticate. The problem I am experiencing happens when I have the Flask app include a decorator to link to the app page that bokeh server serves.

What do I do now?

···

On Wednesday, January 2, 2019 at 1:59:53 AM UTC, Bryan Van de ven wrote:

Hi,

All the “extra stuff” is added by Bokeh, and is required in order to properly embed a Bokeh app. There is no way to avoid it, unless you want to embed using an IFrame, instead of server_document.

In any case, your problem is that you are trying to add “?bokeh-session-id=” yourself, by hand. You should not do this, and do not need to. As you can see in the link that is generated, Bokeh already adds that automatically, as part of the “extra stuff”. Just leave that off.

If you do need to add your own custom HTML args (you don’t here, but just FYI) you must do that by passing a key/value dict for the “arguments” parameter to server_document:

    [https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document](https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document)

That will ensure that they are formatted correctly.

Thanks,

Bryan

On Jan 1, 2019, at 10:24, [email protected] wrote:

I am pulling all my hair out configuring a flask based site, embedding bokeh apps and imposing a session ID using BOKEH_SECRET_KEY and BOKEH_SIGN_SESSIONS. The signed session IDs work fine when I go straight to the app page server by the bokeh server like so: 127.0.0.1:5100/myapp

But I am not having much luck with passing the page link along with the signed session id inside a flask template. Let me explain. Below is the decorator in my flask code:

@app.route(‘/myapp’)

@requires_auth

def myapp():

s_id = session_id.generate_session_id()
#return redirect("[http://127.0.0.1:5100/myapp?bokeh-session-id={}](http://127.0.0.1:5100/myapp?bokeh-session-id=%7B%7D)".format(s_id), code=302)    
print ("[http://127.0.0.1:5100/myapp?bokeh-session-id={}](http://127.0.0.1:5100/myapp?bokeh-session-id=%7B%7D)".format(s_id))
script = server_document("[http://127.0.0.1:5100/domeProfile?bokeh-session-id={}](http://127.0.0.1:5100/domeProfile?bokeh-session-id=%7B%7D)".format(s_id))    
return render_template("myapp.html", script = script)

As you can see I am printing the URL that is passed to the flask template, myapp.html for diiagnostics. The URL printed :

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98

is good to go and I can see the link in browser for the app. However the actual flask page at 127.0.0.1:5000/myapp shows the navbar etc, but content is blank where the bokeh app is supposed to load. The intention is for the template to show the bokeh app using {{ script|safe }}. When I check the page source in the rendered page of 127.0.0.1:5000/myapp, I see that the link generated is like this:

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98/autoload.js?bokeh-autoload-element=1001&bokeh-app-path=/domeProfile&bokeh-absolute-url=http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98" id=“1001”

which explains why the content is blank. What is all the extra stuff being added to the link I am passing? This autoload.js stuff is beyond me. How can I pass the link to the flask template in its pure form and avoid the extra stuff tagged on?


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/f2daeba1-17bb-4b05-aa79-6ff723ddda99%40continuum.io.

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

Hi,

Your code below indicates that you are adding the session id by hand:

    server_document("http://127.0.0.1:5100/domeProfile?bokeh-session-id={}".format(s_id))

Don't add the "?bokeh-session-id={}" or make the call to format. Just Provide the bare URL, with no HTML arguments. The server_document function has to coordinate everything else.

Thanks,

Bryan

···

On Jan 1, 2019, at 19:34, [email protected] wrote:

Thanks for your help. Just to clarify, I am not adding anything by hand. I am relying on the communication between flask server and bokeh server and the session ids that they share. Both servers share the same environment variables of BOKEH_SECRET_KEY = 'blahblahblah' and BOKEH_SIGN_SESSIONS=True.

Hence my frustration. The two servers can talk to each other if the flask server runs native python app to authenticate. The problem I am experiencing happens when I have the Flask app include a decorator to link to the app page that bokeh server serves.

What do I do now?

On Wednesday, January 2, 2019 at 1:59:53 AM UTC, Bryan Van de ven wrote:
Hi,

All the "extra stuff" is added by Bokeh, and is required in order to properly embed a Bokeh app. There is no way to avoid it, unless you want to embed using an IFrame, instead of server_document.

In any case, your problem is that you are trying to add "?bokeh-session-id=" yourself, by hand. You should not do this, and do not need to. As you can see in the link that is generated, Bokeh already adds that automatically, as part of the "extra stuff". Just leave that off.

If you do need to add your own custom HTML args (you don't here, but just FYI) you must do that by passing a key/value dict for the "arguments" parameter to server_document:

        https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document

That will ensure that they are formatted correctly.

Thanks,

Bryan

> On Jan 1, 2019, at 10:24, kaushikma...@gmail.com wrote:
>
> I am pulling all my hair out configuring a flask based site, embedding bokeh apps and imposing a session ID using BOKEH_SECRET_KEY and BOKEH_SIGN_SESSIONS. The signed session IDs work fine when I go straight to the app page server by the bokeh server like so: 127.0.0.1:5100/myapp
>
> But I am not having much luck with passing the page link along with the signed session id inside a flask template. Let me explain. Below is the decorator in my flask code:
>
> @app.route('/myapp')
> @requires_auth
> def myapp():
> s_id = session_id.generate_session_id()
> #return redirect("http://127.0.0.1:5100/myapp?bokeh-session-id={}“.format(s_id), code=302)
> print ("http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id))
> script = server_document("http://127.0.0.1:5100/domeProfile?bokeh-session-id={}".format(s_id))
> return render_template("myapp.html", script = script)
>
> As you can see I am printing the URL that is passed to the flask template, myapp.html for diiagnostics. The URL printed :
>
> http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98
>
>
> is good to go and I can see the link in browser for the app. However the actual flask page at 127.0.0.1:5000/myapp shows the navbar etc, but content is blank where the bokeh app is supposed to load. The intention is for the template to show the bokeh app using {{ script|safe }}. When I check the page source in the rendered page of 127.0.0.1:5000/myapp, I see that the link generated is like this:
>
> http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98/autoload.js?bokeh-autoload-element=1001&bokeh-app-path=/domeProfile&bokeh-absolute-url=http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98" id="1001"
>
>
> which explains why the content is blank. What is all the extra stuff being added to the link I am passing? This autoload.js stuff is beyond me. How can I pass the link to the flask template in its pure form and avoid the extra stuff tagged on?
>
> --
> 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 bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/f2daeba1-17bb-4b05-aa79-6ff723ddda99%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/523cc9c2-1e89-451d-9611-1716cd8f9815%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

I appreciate your help again.

I am prescribing that line hardcoded as part of the function flask configuration. Part of the problem is I know very little about how these servers communicate and I got the idea suggested this link:

https://stackoverflow.com/questions/43183531/simple-username-password-protection-of-a-bokeh-server

When I tried this method suggested, it worked fine with the standalone Flask app.

I will try your suggestion of “Just Provide the bare URL, with no HTML arguments.”. Can you please clarify what you meant by “make the call to format”?

def myapp(): s_id = session_id.generate_session_id() #return redirect("[http://127.0.0.1:5100/myapp?bokeh-session-id={}](http://127.0.0.1:5100/myapp?bokeh-session-id=%7B%7D)".format(s_id), code=302) print ("[http://127.0.0.1:5100/myapp?bokeh-session-id={}](http://127.0.0.1:5100/myapp?bokeh-session-id=%7B%7D)".format(s_id)) script = server_document("[http://127.0.0.1:5100/myapp?bokeh-session-id={}](http://127.0.0.1:5100/domeProfile?bokeh-session-id=%7B%7D)".format(s_id)) return render_template("myapp.html", script = script)

``

···

On Wednesday, January 2, 2019 at 4:13:50 AM UTC, Bryan Van de ven wrote:

Hi,

Your code below indicates that you are adding the session id by hand:

server_document("[http://127.0.0.1:5100/domeProfile?bokeh-session-id={}](http://127.0.0.1:5100/domeProfile?bokeh-session-id=%7B%7D)".format(s_id))    

Don’t add the “?bokeh-session-id={}” or make the call to format. Just Provide the bare URL, with no HTML arguments. The server_document function has to coordinate everything else.

Thanks,

Bryan

On Jan 1, 2019, at 19:34, [email protected] wrote:

Thanks for your help. Just to clarify, I am not adding anything by hand. I am relying on the communication between flask server and bokeh server and the session ids that they share. Both servers share the same environment variables of BOKEH_SECRET_KEY = ‘blahblahblah’ and BOKEH_SIGN_SESSIONS=True.

Hence my frustration. The two servers can talk to each other if the flask server runs native python app to authenticate. The problem I am experiencing happens when I have the Flask app include a decorator to link to the app page that bokeh server serves.

What do I do now?

On Wednesday, January 2, 2019 at 1:59:53 AM UTC, Bryan Van de ven wrote:

Hi,

All the “extra stuff” is added by Bokeh, and is required in order to properly embed a Bokeh app. There is no way to avoid it, unless you want to embed using an IFrame, instead of server_document.

In any case, your problem is that you are trying to add “?bokeh-session-id=” yourself, by hand. You should not do this, and do not need to. As you can see in the link that is generated, Bokeh already adds that automatically, as part of the “extra stuff”. Just leave that off.

If you do need to add your own custom HTML args (you don’t here, but just FYI) you must do that by passing a key/value dict for the “arguments” parameter to server_document:

    [https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document](https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document)

That will ensure that they are formatted correctly.

Thanks,

Bryan

On Jan 1, 2019, at 10:24, [email protected] wrote:

I am pulling all my hair out configuring a flask based site, embedding bokeh apps and imposing a session ID using BOKEH_SECRET_KEY and BOKEH_SIGN_SESSIONS. The signed session IDs work fine when I go straight to the app page server by the bokeh server like so: 127.0.0.1:5100/myapp

But I am not having much luck with passing the page link along with the signed session id inside a flask template. Let me explain. Below is the decorator in my flask code:

@app.route(‘/myapp’)
@requires_auth
def myapp():
s_id = session_id.generate_session_id()
#return redirect(“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id), code=302)
print (“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id))
script = server_document(“http://127.0.0.1:5100/domeProfile?bokeh-session-id={}”.format(s_id))
return render_template(“myapp.html”, script = script)

As you can see I am printing the URL that is passed to the flask template, myapp.html for diiagnostics. The URL printed :

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98

is good to go and I can see the link in browser for the app. However the actual flask page at 127.0.0.1:5000/myapp shows the navbar etc, but content is blank where the bokeh app is supposed to load. The intention is for the template to show the bokeh app using {{ script|safe }}. When I check the page source in the rendered page of 127.0.0.1:5000/myapp, I see that the link generated is like this:

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98/autoload.js?bokeh-autoload-element=1001&bokeh-app-path=/domeProfile&bokeh-absolute-url=http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98" id=“1001”

which explains why the content is blank. What is all the extra stuff being added to the link I am passing? This autoload.js stuff is beyond me. How can I pass the link to the flask template in its pure form and avoid the extra stuff tagged on?


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/f2daeba1-17bb-4b05-aa79-6ff723ddda99%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/523cc9c2-1e89-451d-9611-1716cd8f9815%40continuum.io.

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

I just tried the following code in my Flask code per your suggestion and it didn’t work. It does not generate any session ID when the link is called. I believe that the session ID needs to be handed over to bokeh server by Flask (as my original code was trying to do).

@app.route(‘/myapp’)
@requires_auth
def myapp():
s_id = session_id.generate_session_id()
script = server_document(“http://127.0.0.1:5100/myapp”)
return render_template(“myapp.html”, script = script)

``

···

On Wednesday, January 2, 2019 at 4:13:50 AM UTC, Bryan Van de ven wrote:

Hi,

Your code below indicates that you are adding the session id by hand:

server_document("[http://127.0.0.1:5100/domeProfile?bokeh-session-id={}](http://127.0.0.1:5100/domeProfile?bokeh-session-id=%7B%7D)".format(s_id))    

Don’t add the “?bokeh-session-id={}” or make the call to format. Just Provide the bare URL, with no HTML arguments. The server_document function has to coordinate everything else.

Thanks,

Bryan

On Jan 1, 2019, at 19:34, [email protected] wrote:

Thanks for your help. Just to clarify, I am not adding anything by hand. I am relying on the communication between flask server and bokeh server and the session ids that they share. Both servers share the same environment variables of BOKEH_SECRET_KEY = ‘blahblahblah’ and BOKEH_SIGN_SESSIONS=True.

Hence my frustration. The two servers can talk to each other if the flask server runs native python app to authenticate. The problem I am experiencing happens when I have the Flask app include a decorator to link to the app page that bokeh server serves.

What do I do now?

On Wednesday, January 2, 2019 at 1:59:53 AM UTC, Bryan Van de ven wrote:

Hi,

All the “extra stuff” is added by Bokeh, and is required in order to properly embed a Bokeh app. There is no way to avoid it, unless you want to embed using an IFrame, instead of server_document.

In any case, your problem is that you are trying to add “?bokeh-session-id=” yourself, by hand. You should not do this, and do not need to. As you can see in the link that is generated, Bokeh already adds that automatically, as part of the “extra stuff”. Just leave that off.

If you do need to add your own custom HTML args (you don’t here, but just FYI) you must do that by passing a key/value dict for the “arguments” parameter to server_document:

    [https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document](https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document)

That will ensure that they are formatted correctly.

Thanks,

Bryan

On Jan 1, 2019, at 10:24, [email protected] wrote:

I am pulling all my hair out configuring a flask based site, embedding bokeh apps and imposing a session ID using BOKEH_SECRET_KEY and BOKEH_SIGN_SESSIONS. The signed session IDs work fine when I go straight to the app page server by the bokeh server like so: 127.0.0.1:5100/myapp

But I am not having much luck with passing the page link along with the signed session id inside a flask template. Let me explain. Below is the decorator in my flask code:

@app.route(‘/myapp’)
@requires_auth
def myapp():
s_id = session_id.generate_session_id()
#return redirect(“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id), code=302)
print (“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id))
script = server_document(“http://127.0.0.1:5100/domeProfile?bokeh-session-id={}”.format(s_id))
return render_template(“myapp.html”, script = script)

As you can see I am printing the URL that is passed to the flask template, myapp.html for diiagnostics. The URL printed :

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98

is good to go and I can see the link in browser for the app. However the actual flask page at 127.0.0.1:5000/myapp shows the navbar etc, but content is blank where the bokeh app is supposed to load. The intention is for the template to show the bokeh app using {{ script|safe }}. When I check the page source in the rendered page of 127.0.0.1:5000/myapp, I see that the link generated is like this:

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98/autoload.js?bokeh-autoload-element=1001&bokeh-app-path=/domeProfile&bokeh-absolute-url=http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98" id=“1001”

which explains why the content is blank. What is all the extra stuff being added to the link I am passing? This autoload.js stuff is beyond me. How can I pass the link to the flask template in its pure form and avoid the extra stuff tagged on?


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/f2daeba1-17bb-4b05-aa79-6ff723ddda99%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/523cc9c2-1e89-451d-9611-1716cd8f9815%40continuum.io.

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

Just as another point of reference, the following decorator works, but brings up the raw page (localhost:5100/myapp) that Bokeh server creates, not one that I would like to embed inside my flask app (that was the reason to incorporate the script forwarding in the original post)

@app.route(‘/myapp’)
@requires_auth
def myapp():
s_id = session_id.generate_session_id()

return redirect("http://127.0.0.1:5100/myapp?bokeh-session-id={}".format(s_id), code=302)

``

···

On Wednesday, January 2, 2019 at 4:57:14 AM UTC, Kaushik Mallick wrote:

I just tried the following code in my Flask code per your suggestion and it didn’t work. It does not generate any session ID when the link is called. I believe that the session ID needs to be handed over to bokeh server by Flask (as my original code was trying to do).

@app.route(‘/myapp’)
@requires_auth
def myapp():
s_id = session_id.generate_session_id()
script = server_document(“http://127.0.0.1:5100/myapp”)
return render_template(“myapp.html”, script = script)

``

On Wednesday, January 2, 2019 at 4:13:50 AM UTC, Bryan Van de ven wrote:

Hi,

Your code below indicates that you are adding the session id by hand:

server_document("[http://127.0.0.1:5100/domeProfile?bokeh-session-id={}](http://127.0.0.1:5100/domeProfile?bokeh-session-id=%7B%7D)".format(s_id))    

Don’t add the “?bokeh-session-id={}” or make the call to format. Just Provide the bare URL, with no HTML arguments. The server_document function has to coordinate everything else.

Thanks,

Bryan

On Jan 1, 2019, at 19:34, [email protected] wrote:

Thanks for your help. Just to clarify, I am not adding anything by hand. I am relying on the communication between flask server and bokeh server and the session ids that they share. Both servers share the same environment variables of BOKEH_SECRET_KEY = ‘blahblahblah’ and BOKEH_SIGN_SESSIONS=True.

Hence my frustration. The two servers can talk to each other if the flask server runs native python app to authenticate. The problem I am experiencing happens when I have the Flask app include a decorator to link to the app page that bokeh server serves.

What do I do now?

On Wednesday, January 2, 2019 at 1:59:53 AM UTC, Bryan Van de ven wrote:

Hi,

All the “extra stuff” is added by Bokeh, and is required in order to properly embed a Bokeh app. There is no way to avoid it, unless you want to embed using an IFrame, instead of server_document.

In any case, your problem is that you are trying to add “?bokeh-session-id=” yourself, by hand. You should not do this, and do not need to. As you can see in the link that is generated, Bokeh already adds that automatically, as part of the “extra stuff”. Just leave that off.

If you do need to add your own custom HTML args (you don’t here, but just FYI) you must do that by passing a key/value dict for the “arguments” parameter to server_document:

    [https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document](https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document)

That will ensure that they are formatted correctly.

Thanks,

Bryan

On Jan 1, 2019, at 10:24, [email protected] wrote:

I am pulling all my hair out configuring a flask based site, embedding bokeh apps and imposing a session ID using BOKEH_SECRET_KEY and BOKEH_SIGN_SESSIONS. The signed session IDs work fine when I go straight to the app page server by the bokeh server like so: 127.0.0.1:5100/myapp

But I am not having much luck with passing the page link along with the signed session id inside a flask template. Let me explain. Below is the decorator in my flask code:

@app.route(‘/myapp’)
@requires_auth
def myapp():
s_id = session_id.generate_session_id()
#return redirect(“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id), code=302)
print (“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id))
script = server_document(“http://127.0.0.1:5100/domeProfile?bokeh-session-id={}”.format(s_id))
return render_template(“myapp.html”, script = script)

As you can see I am printing the URL that is passed to the flask template, myapp.html for diiagnostics. The URL printed :

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98

is good to go and I can see the link in browser for the app. However the actual flask page at 127.0.0.1:5000/myapp shows the navbar etc, but content is blank where the bokeh app is supposed to load. The intention is for the template to show the bokeh app using {{ script|safe }}. When I check the page source in the rendered page of 127.0.0.1:5000/myapp, I see that the link generated is like this:

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98/autoload.js?bokeh-autoload-element=1001&bokeh-app-path=/domeProfile&bokeh-absolute-url=http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98" id=“1001”

which explains why the content is blank. What is all the extra stuff being added to the link I am passing? This autoload.js stuff is beyond me. How can I pass the link to the flask template in its pure form and avoid the extra stuff tagged on?


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/f2daeba1-17bb-4b05-aa79-6ff723ddda99%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/523cc9c2-1e89-451d-9611-1716cd8f9815%40continuum.io.

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

Hrm,

Can you try passing the session ID in the arguments parameter, as I described earlier? Something like:

  arguments={ 'bokeh-session-id": s_id }

That should properly add the HTML argument after the autoload.js endpoint.

If that doesn't work I think a minimal reproducer in a GH repo or gist would be needed to investigate further.

Thanks,

Bryan

···

On Jan 1, 2019, at 17:59, Bryan Van de ven <[email protected]> wrote:

Hi,

All the "extra stuff" is added by Bokeh, and is required in order to properly embed a Bokeh app. There is no way to avoid it, unless you want to embed using an IFrame, instead of server_document.

In any case, your problem is that you are trying to add "?bokeh-session-id=" yourself, by hand. You should not do this, and do not need to. As you can see in the link that is generated, Bokeh already adds that automatically, as part of the "extra stuff". Just leave that off.

If you do need to add your own custom HTML args (you don't here, but just FYI) you must do that by passing a key/value dict for the "arguments" parameter to server_document:

  https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document

That will ensure that they are formatted correctly.

Thanks,

Bryan

On Jan 1, 2019, at 10:24, [email protected] wrote:

I am pulling all my hair out configuring a flask based site, embedding bokeh apps and imposing a session ID using BOKEH_SECRET_KEY and BOKEH_SIGN_SESSIONS. The signed session IDs work fine when I go straight to the app page server by the bokeh server like so: 127.0.0.1:5100/myapp

But I am not having much luck with passing the page link along with the signed session id inside a flask template. Let me explain. Below is the decorator in my flask code:

@app.route('/myapp')
@requires_auth
def myapp():
   s_id = session_id.generate_session_id()
   #return redirect("http://127.0.0.1:5100/myapp?bokeh-session-id={}“.format(s_id), code=302)
   print ("http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id))
   script = server_document("http://127.0.0.1:5100/domeProfile?bokeh-session-id={}".format(s_id))
   return render_template("myapp.html", script = script)

As you can see I am printing the URL that is passed to the flask template, myapp.html for diiagnostics. The URL printed :

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98

is good to go and I can see the link in browser for the app. However the actual flask page at 127.0.0.1:5000/myapp shows the navbar etc, but content is blank where the bokeh app is supposed to load. The intention is for the template to show the bokeh app using {{ script|safe }}. When I check the page source in the rendered page of 127.0.0.1:5000/myapp, I see that the link generated is like this:

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98/autoload.js?bokeh-autoload-element=1001&bokeh-app-path=/domeProfile&bokeh-absolute-url=http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98&quot; id="1001"

which explains why the content is blank. What is all the extra stuff being added to the link I am passing? This autoload.js stuff is beyond me. How can I pass the link to the flask template in its pure form and avoid the extra stuff tagged on?

--
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/f2daeba1-17bb-4b05-aa79-6ff723ddda99%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

OK I tried this, although I am not sure if I did it correctly. And that didn’t help either.

Any other suggestion?

@app.route(‘/myapp’)
@requires_auth
def myapp():
s_id = session_id.generate_session_id()
script = server_document(“http://127.0.0.1:5100/myapp",arguments={"bokeh-session-id”: s_id })
return render_template(“myapp.html”, script = script)

``

···

On Wednesday, January 2, 2019 at 6:15:56 AM UTC, Bryan Van de ven wrote:

Hrm,

Can you try passing the session ID in the arguments parameter, as I described earlier? Something like:

    arguments={ 'bokeh-session-id": s_id }

That should properly add the HTML argument after the autoload.js endpoint.

If that doesn’t work I think a minimal reproducer in a GH repo or gist would be needed to investigate further.

Thanks,

Bryan

On Jan 1, 2019, at 17:59, Bryan Van de ven [email protected] wrote:

Hi,

All the “extra stuff” is added by Bokeh, and is required in order to properly embed a Bokeh app. There is no way to avoid it, unless you want to embed using an IFrame, instead of server_document.

In any case, your problem is that you are trying to add “?bokeh-session-id=” yourself, by hand. You should not do this, and do not need to. As you can see in the link that is generated, Bokeh already adds that automatically, as part of the “extra stuff”. Just leave that off.

If you do need to add your own custom HTML args (you don’t here, but just FYI) you must do that by passing a key/value dict for the “arguments” parameter to server_document:

    [https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document](https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document)

That will ensure that they are formatted correctly.

Thanks,

Bryan

On Jan 1, 2019, at 10:24, [email protected] wrote:

I am pulling all my hair out configuring a flask based site, embedding bokeh apps and imposing a session ID using BOKEH_SECRET_KEY and BOKEH_SIGN_SESSIONS. The signed session IDs work fine when I go straight to the app page server by the bokeh server like so: 127.0.0.1:5100/myapp

But I am not having much luck with passing the page link along with the signed session id inside a flask template. Let me explain. Below is the decorator in my flask code:

@app.route(‘/myapp’)

@requires_auth

def myapp():

s_id = session_id.generate_session_id()

#return redirect(“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id), code=302)

print (“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id))

script = server_document(“http://127.0.0.1:5100/domeProfile?bokeh-session-id={}”.format(s_id))

return render_template(“myapp.html”, script = script)

As you can see I am printing the URL that is passed to the flask template, myapp.html for diiagnostics. The URL printed :

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98

is good to go and I can see the link in browser for the app. However the actual flask page at 127.0.0.1:5000/myapp shows the navbar etc, but content is blank where the bokeh app is supposed to load. The intention is for the template to show the bokeh app using {{ script|safe }}. When I check the page source in the rendered page of 127.0.0.1:5000/myapp, I see that the link generated is like this:

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98/autoload.js?bokeh-autoload-element=1001&bokeh-app-path=/domeProfile&bokeh-absolute-url=http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98" id=“1001”

which explains why the content is blank. What is all the extra stuff being added to the link I am passing? This autoload.js stuff is beyond me. How can I pass the link to the flask template in its pure form and avoid the extra stuff tagged on?


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/f2daeba1-17bb-4b05-aa79-6ff723ddda99%40continuum.io.

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

Hi,

Not offhand. The signed session capability has not been very much used by anyone, as far as I know. Yours is the first question I can recall seeing about it since it was introduced three years ago. The basic API is very well covered by unit tests but its possible some wider integration bug has been introduced through disuse. To speculate further will require me to actually run code and dig around. As I mentioned I'm happy to do so if you can provide a compete, miminal starting point in a gist or repo.

Thanks,

Bryan

···

On Jan 2, 2019, at 13:57, [email protected] wrote:

OK I tried this, although I am not sure if I did it correctly. And that didn't help either.

Any other suggestion?

@app.route('/myapp')
@requires_auth
def myapp():
    s_id = session_id.generate_session_id()
    script = server_document("http://127.0.0.1:5100/myapp",arguments={"bokeh-session-id&quot;: s_id })
    return render_template("myapp.html", script = script)

On Wednesday, January 2, 2019 at 6:15:56 AM UTC, Bryan Van de ven wrote:
Hrm,

Can you try passing the session ID in the arguments parameter, as I described earlier? Something like:

        arguments={ 'bokeh-session-id": s_id }

That should properly add the HTML argument after the autoload.js endpoint.

If that doesn't work I think a minimal reproducer in a GH repo or gist would be needed to investigate further.

Thanks,

Bryan

> On Jan 1, 2019, at 17:59, Bryan Van de ven <[email protected]> wrote:
>
> Hi,
>
> All the "extra stuff" is added by Bokeh, and is required in order to properly embed a Bokeh app. There is no way to avoid it, unless you want to embed using an IFrame, instead of server_document.
>
> In any case, your problem is that you are trying to add "?bokeh-session-id=" yourself, by hand. You should not do this, and do not need to. As you can see in the link that is generated, Bokeh already adds that automatically, as part of the "extra stuff". Just leave that off.
>
> If you do need to add your own custom HTML args (you don't here, but just FYI) you must do that by passing a key/value dict for the "arguments" parameter to server_document:
>
> https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document
>
> That will ensure that they are formatted correctly.
>
> Thanks,
>
> Bryan
>
>> On Jan 1, 2019, at 10:24, kaushikma...@gmail.com wrote:
>>
>> I am pulling all my hair out configuring a flask based site, embedding bokeh apps and imposing a session ID using BOKEH_SECRET_KEY and BOKEH_SIGN_SESSIONS. The signed session IDs work fine when I go straight to the app page server by the bokeh server like so: 127.0.0.1:5100/myapp
>>
>> But I am not having much luck with passing the page link along with the signed session id inside a flask template. Let me explain. Below is the decorator in my flask code:
>>
>> @app.route('/myapp')
>> @requires_auth
>> def myapp():
>> s_id = session_id.generate_session_id()
>> #return redirect("http://127.0.0.1:5100/myapp?bokeh-session-id={}“.format(s_id), code=302)
>> print ("http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id))
>> script = server_document("http://127.0.0.1:5100/domeProfile?bokeh-session-id={}".format(s_id))
>> return render_template("myapp.html", script = script)
>>
>> As you can see I am printing the URL that is passed to the flask template, myapp.html for diiagnostics. The URL printed :
>>
>> http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98
>>
>>
>> is good to go and I can see the link in browser for the app. However the actual flask page at 127.0.0.1:5000/myapp shows the navbar etc, but content is blank where the bokeh app is supposed to load. The intention is for the template to show the bokeh app using {{ script|safe }}. When I check the page source in the rendered page of 127.0.0.1:5000/myapp, I see that the link generated is like this:
>>
>> http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98/autoload.js?bokeh-autoload-element=1001&bokeh-app-path=/domeProfile&bokeh-absolute-url=http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98&quot; id="1001"
>>
>>
>> which explains why the content is blank. What is all the extra stuff being added to the link I am passing? This autoload.js stuff is beyond me. How can I pass the link to the flask template in its pure form and avoid the extra stuff tagged on?
>>
>> --
>> 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 bokeh+un...@continuum.io.
>> To post to this group, send email to bo...@continuum.io.
>> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/f2daeba1-17bb-4b05-aa79-6ff723ddda99%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/815517a0-6a35-4ff4-9d95-c5c90dfae488%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

It works finally! Here is the code snippet for Flask decorator that worked. I got it working after playing around some options presented in:

https://bokeh.pydata.org/en/latest/docs/reference/client/session.html

@app.route(‘/myapp’)
@requires_auth
def myapp():
s_id = session_id.generate_session_id()
# Embed bokeh app into HTML via Flask Render
script = server_session(session_id=s_id, url=“http://127.0.0.1:5100/myapp”)
return render_template(“myapp.html”, script=script, template=“Flask”)

``

Now I have to work on checking sessions and authorization. The Flask page is rendering the bokeh app even after logging out. Maybe thats a separate question.

Thanks for all the help.

···

On Wednesday, January 2, 2019 at 10:07:12 PM UTC, Bryan Van de ven wrote:

Hi,

Not offhand. The signed session capability has not been very much used by anyone, as far as I know. Yours is the first question I can recall seeing about it since it was introduced three years ago. The basic API is very well covered by unit tests but its possible some wider integration bug has been introduced through disuse. To speculate further will require me to actually run code and dig around. As I mentioned I’m happy to do so if you can provide a compete, miminal starting point in a gist or repo.

Thanks,

Bryan

On Jan 2, 2019, at 13:57, [email protected] wrote:

OK I tried this, although I am not sure if I did it correctly. And that didn’t help either.

Any other suggestion?

@app.route(‘/myapp’)

@requires_auth

def myapp():

s_id = session_id.generate_session_id()
script = server_document("[http://127.0.0.1:5100/myapp](http://127.0.0.1:5100/myapp)",arguments={"bokeh-session-id": s_id })    
return render_template("myapp.html", script = script)

On Wednesday, January 2, 2019 at 6:15:56 AM UTC, Bryan Van de ven wrote:

Hrm,

Can you try passing the session ID in the arguments parameter, as I described earlier? Something like:

    arguments={ 'bokeh-session-id": s_id }

That should properly add the HTML argument after the autoload.js endpoint.

If that doesn’t work I think a minimal reproducer in a GH repo or gist would be needed to investigate further.

Thanks,

Bryan

On Jan 1, 2019, at 17:59, Bryan Van de ven [email protected] wrote:

Hi,

All the “extra stuff” is added by Bokeh, and is required in order to properly embed a Bokeh app. There is no way to avoid it, unless you want to embed using an IFrame, instead of server_document.

In any case, your problem is that you are trying to add “?bokeh-session-id=” yourself, by hand. You should not do this, and do not need to. As you can see in the link that is generated, Bokeh already adds that automatically, as part of the “extra stuff”. Just leave that off.

If you do need to add your own custom HTML args (you don’t here, but just FYI) you must do that by passing a key/value dict for the “arguments” parameter to server_document:

    [https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document](https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document)

That will ensure that they are formatted correctly.

Thanks,

Bryan

On Jan 1, 2019, at 10:24, [email protected] wrote:

I am pulling all my hair out configuring a flask based site, embedding bokeh apps and imposing a session ID using BOKEH_SECRET_KEY and BOKEH_SIGN_SESSIONS. The signed session IDs work fine when I go straight to the app page server by the bokeh server like so: 127.0.0.1:5100/myapp

But I am not having much luck with passing the page link along with the signed session id inside a flask template. Let me explain. Below is the decorator in my flask code:

@app.route(‘/myapp’)
@requires_auth
def myapp():
s_id = session_id.generate_session_id()
#return redirect(“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id), code=302)
print (“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id))
script = server_document(“http://127.0.0.1:5100/domeProfile?bokeh-session-id={}”.format(s_id))
return render_template(“myapp.html”, script = script)

As you can see I am printing the URL that is passed to the flask template, myapp.html for diiagnostics. The URL printed :

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98

is good to go and I can see the link in browser for the app. However the actual flask page at 127.0.0.1:5000/myapp shows the navbar etc, but content is blank where the bokeh app is supposed to load. The intention is for the template to show the bokeh app using {{ script|safe }}. When I check the page source in the rendered page of 127.0.0.1:5000/myapp, I see that the link generated is like this:

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98/autoload.js?bokeh-autoload-element=1001&bokeh-app-path=/domeProfile&bokeh-absolute-url=http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98" id=“1001”

which explains why the content is blank. What is all the extra stuff being added to the link I am passing? This autoload.js stuff is beyond me. How can I pass the link to the flask template in its pure form and avoid the extra stuff tagged on?


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/f2daeba1-17bb-4b05-aa79-6ff723ddda99%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/815517a0-6a35-4ff4-9d95-c5c90dfae488%40continuum.io.

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

Just in case, it helps someone in the future, a simple change solved my issue with authorization. I pip installed flask-user and changed the code to this:

@app.route(’/myapp’)
@login_required # User must be authenticated
def myapp():
s_id = session_id.generate_session_id()
# Embed bokeh app into HTML via Flask Render
script = server_session(session_id=s_id, url=“http://127.0.0.1:5100/myapp”)
return render_template(“myapp.html”, script=script, template=“Flask”)

``

``

Now my Flask server can embed apps from the bokeh server when a user is logged in.

Hi,

I'm glad that worked. I had forgotten there was an explicit session_id parameter. I would say that this area (sessions wrt auth/logins) is not throughly developed. If you have any thoughts or suggestions for improved docs or features to support things better, please let us know. I'm not sure there is currently any way to explicitly destroy a session, only to wait for it to time out and be reclaimed. So that might actually be a useful thing to consider? Anyway at the moment it might be necessary e.g. to run the bokeh server behind a proxy so that access can be controlled there. Again, any suggestions to improve the project in this area are welcome.

Thanks,

Bryan

···

On Jan 2, 2019, at 15:24, [email protected] wrote:

It works finally! Here is the code snippet for Flask decorator that worked. I got it working after playing around some options presented in:

bokeh.client.session — Bokeh 3.3.2 Documentation

@app.route('/myapp')
@requires_auth
def myapp():
    s_id = session_id.generate_session_id()
    # Embed bokeh app into HTML via Flask Render
    script = server_session(session_id=s_id, url="http://127.0.0.1:5100/myapp&quot;\)
    return render_template("myapp.html", script=script, template="Flask")

Now I have to work on checking sessions and authorization. The Flask page is rendering the bokeh app even after logging out. Maybe thats a separate question.

Thanks for all the help.

On Wednesday, January 2, 2019 at 10:07:12 PM UTC, Bryan Van de ven wrote:
Hi,

Not offhand. The signed session capability has not been very much used by anyone, as far as I know. Yours is the first question I can recall seeing about it since it was introduced three years ago. The basic API is very well covered by unit tests but its possible some wider integration bug has been introduced through disuse. To speculate further will require me to actually run code and dig around. As I mentioned I'm happy to do so if you can provide a compete, miminal starting point in a gist or repo.

Thanks,

Bryan

> On Jan 2, 2019, at 13:57, kaushikma...@gmail.com wrote:
>
> OK I tried this, although I am not sure if I did it correctly. And that didn't help either.
>
> Any other suggestion?
>
> @app.route('/myapp')
> @requires_auth
> def myapp():
> s_id = session_id.generate_session_id()
> script = server_document("http://127.0.0.1:5100/myapp",arguments={"bokeh-session-id&quot;: s_id })
> return render_template("myapp.html", script = script)
>
>
>
> On Wednesday, January 2, 2019 at 6:15:56 AM UTC, Bryan Van de ven wrote:
> Hrm,
>
> Can you try passing the session ID in the arguments parameter, as I described earlier? Something like:
>
> arguments={ 'bokeh-session-id": s_id }
>
> That should properly add the HTML argument after the autoload.js endpoint.
>
> If that doesn't work I think a minimal reproducer in a GH repo or gist would be needed to investigate further.
>
> Thanks,
>
> Bryan
>
> > On Jan 1, 2019, at 17:59, Bryan Van de ven <[email protected]> wrote:
> >
> > Hi,
> >
> > All the "extra stuff" is added by Bokeh, and is required in order to properly embed a Bokeh app. There is no way to avoid it, unless you want to embed using an IFrame, instead of server_document.
> >
> > In any case, your problem is that you are trying to add "?bokeh-session-id=" yourself, by hand. You should not do this, and do not need to. As you can see in the link that is generated, Bokeh already adds that automatically, as part of the "extra stuff". Just leave that off.
> >
> > If you do need to add your own custom HTML args (you don't here, but just FYI) you must do that by passing a key/value dict for the "arguments" parameter to server_document:
> >
> > https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document
> >
> > That will ensure that they are formatted correctly.
> >
> > Thanks,
> >
> > Bryan
> >
> >> On Jan 1, 2019, at 10:24, kaushikma...@gmail.com wrote:
> >>
> >> I am pulling all my hair out configuring a flask based site, embedding bokeh apps and imposing a session ID using BOKEH_SECRET_KEY and BOKEH_SIGN_SESSIONS. The signed session IDs work fine when I go straight to the app page server by the bokeh server like so: 127.0.0.1:5100/myapp
> >>
> >> But I am not having much luck with passing the page link along with the signed session id inside a flask template. Let me explain. Below is the decorator in my flask code:
> >>
> >> @app.route('/myapp')
> >> @requires_auth
> >> def myapp():
> >> s_id = session_id.generate_session_id()
> >> #return redirect("http://127.0.0.1:5100/myapp?bokeh-session-id={}“.format(s_id), code=302)
> >> print ("http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id))
> >> script = server_document("http://127.0.0.1:5100/domeProfile?bokeh-session-id={}".format(s_id))
> >> return render_template("myapp.html", script = script)
> >>
> >> As you can see I am printing the URL that is passed to the flask template, myapp.html for diiagnostics. The URL printed :
> >>
> >> http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98
> >>
> >>
> >> is good to go and I can see the link in browser for the app. However the actual flask page at 127.0.0.1:5000/myapp shows the navbar etc, but content is blank where the bokeh app is supposed to load. The intention is for the template to show the bokeh app using {{ script|safe }}. When I check the page source in the rendered page of 127.0.0.1:5000/myapp, I see that the link generated is like this:
> >>
> >> http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98/autoload.js?bokeh-autoload-element=1001&bokeh-app-path=/domeProfile&bokeh-absolute-url=http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98&quot; id="1001"
> >>
> >>
> >> which explains why the content is blank. What is all the extra stuff being added to the link I am passing? This autoload.js stuff is beyond me. How can I pass the link to the flask template in its pure form and avoid the extra stuff tagged on?
> >>
> >> --
> >> 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 bokeh+un...@continuum.io.
> >> To post to this group, send email to bo...@continuum.io.
> >> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/f2daeba1-17bb-4b05-aa79-6ff723ddda99%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 bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/815517a0-6a35-4ff4-9d95-c5c90dfae488%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/cad409ff-c431-4c4f-a4d2-029e816cdd11%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Bryan
Thanks for the note and please keep up all the good work on Bokeh. Is definitely getting very powerful and useful by the day. If there is anything we can do to help with the documentation, we would love to, since it appears very terse and difficult to navigate for someone not versed in sever setup. Appreciate all your help and nudging.

···

On Wednesday, January 2, 2019 at 5:06:59 PM UTC-7, Bryan Van de ven wrote:

Hi,

I’m glad that worked. I had forgotten there was an explicit session_id parameter. I would say that this area (sessions wrt auth/logins) is not throughly developed. If you have any thoughts or suggestions for improved docs or features to support things better, please let us know. I’m not sure there is currently any way to explicitly destroy a session, only to wait for it to time out and be reclaimed. So that might actually be a useful thing to consider? Anyway at the moment it might be necessary e.g. to run the bokeh server behind a proxy so that access can be controlled there. Again, any suggestions to improve the project in this area are welcome.

Thanks,

Bryan

On Jan 2, 2019, at 15:24, [email protected] wrote:

It works finally! Here is the code snippet for Flask decorator that worked. I got it working after playing around some options presented in:

https://bokeh.pydata.org/en/latest/docs/reference/client/session.html

@app.route(‘/myapp’)

@requires_auth

def myapp():

s_id = session_id.generate_session_id()
# Embed bokeh app into HTML via Flask Render
script = server_session(session_id=s_id, url="[http://127.0.0.1:5100/myapp](http://127.0.0.1:5100/myapp)")
return render_template("myapp.html", script=script, template="Flask")

Now I have to work on checking sessions and authorization. The Flask page is rendering the bokeh app even after logging out. Maybe thats a separate question.

Thanks for all the help.

On Wednesday, January 2, 2019 at 10:07:12 PM UTC, Bryan Van de ven wrote:

Hi,

Not offhand. The signed session capability has not been very much used by anyone, as far as I know. Yours is the first question I can recall seeing about it since it was introduced three years ago. The basic API is very well covered by unit tests but its possible some wider integration bug has been introduced through disuse. To speculate further will require me to actually run code and dig around. As I mentioned I’m happy to do so if you can provide a compete, miminal starting point in a gist or repo.

Thanks,

Bryan

On Jan 2, 2019, at 13:57, [email protected] wrote:

OK I tried this, although I am not sure if I did it correctly. And that didn’t help either.

Any other suggestion?

@app.route(‘/myapp’)
@requires_auth
def myapp():
s_id = session_id.generate_session_id()
script = server_document(“http://127.0.0.1:5100/myapp”,arguments={“bokeh-session-id”: s_id })
return render_template(“myapp.html”, script = script)

On Wednesday, January 2, 2019 at 6:15:56 AM UTC, Bryan Van de ven wrote:
Hrm,

Can you try passing the session ID in the arguments parameter, as I described earlier? Something like:

    arguments={ 'bokeh-session-id": s_id }

That should properly add the HTML argument after the autoload.js endpoint.

If that doesn’t work I think a minimal reproducer in a GH repo or gist would be needed to investigate further.

Thanks,

Bryan

On Jan 1, 2019, at 17:59, Bryan Van de ven [email protected] wrote:

Hi,

All the “extra stuff” is added by Bokeh, and is required in order to properly embed a Bokeh app. There is no way to avoid it, unless you want to embed using an IFrame, instead of server_document.

In any case, your problem is that you are trying to add “?bokeh-session-id=” yourself, by hand. You should not do this, and do not need to. As you can see in the link that is generated, Bokeh already adds that automatically, as part of the “extra stuff”. Just leave that off.

If you do need to add your own custom HTML args (you don’t here, but just FYI) you must do that by passing a key/value dict for the “arguments” parameter to server_document:

    [https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document](https://bokeh.pydata.org/en/latest/docs/reference/embed.html#bokeh.embed.server_document)

That will ensure that they are formatted correctly.

Thanks,

Bryan

On Jan 1, 2019, at 10:24, [email protected] wrote:

I am pulling all my hair out configuring a flask based site, embedding bokeh apps and imposing a session ID using BOKEH_SECRET_KEY and BOKEH_SIGN_SESSIONS. The signed session IDs work fine when I go straight to the app page server by the bokeh server like so: 127.0.0.1:5100/myapp

But I am not having much luck with passing the page link along with the signed session id inside a flask template. Let me explain. Below is the decorator in my flask code:

@app.route(‘/myapp’)
@requires_auth
def myapp():
s_id = session_id.generate_session_id()
#return redirect(“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id), code=302)
print (“http://127.0.0.1:5100/myapp?bokeh-session-id={}”.format(s_id))
script = server_document(“http://127.0.0.1:5100/domeProfile?bokeh-session-id={}”.format(s_id))
return render_template(“myapp.html”, script = script)

As you can see I am printing the URL that is passed to the flask template, myapp.html for diiagnostics. The URL printed :

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98

is good to go and I can see the link in browser for the app. However the actual flask page at 127.0.0.1:5000/myapp shows the navbar etc, but content is blank where the bokeh app is supposed to load. The intention is for the template to show the bokeh app using {{ script|safe }}. When I check the page source in the rendered page of 127.0.0.1:5000/myapp, I see that the link generated is like this:

http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98/autoload.js?bokeh-autoload-element=1001&bokeh-app-path=/domeProfile&bokeh-absolute-url=http://127.0.0.1:5100/myapp?bokeh-session-id=LVbPpfnUoBJpC2pWYef5A52LsiZkq2KFriHgoNjOkTly-CoI2IGKIvL7e7ZrIMax5tExlq_wod7wKIAIsdvHIT98" id=“1001”

which explains why the content is blank. What is all the extra stuff being added to the link I am passing? This autoload.js stuff is beyond me. How can I pass the link to the flask template in its pure form and avoid the extra stuff tagged on?


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/f2daeba1-17bb-4b05-aa79-6ff723ddda99%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/815517a0-6a35-4ff4-9d95-c5c90dfae488%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/cad409ff-c431-4c4f-a4d2-029e816cdd11%40continuum.io.

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