Hello all,
Basically, I have a python script (can be more than one) each generates a plot. I have a common instance of document (recevied from curdoc())**in each of the scripts so that all plots are stored in one document. To view the plots for a given document, I am using session = push_session(curdoc()). And I can see the plot using session.show().
In this case, the problem is: I can’t access the plots without the long session key. i.e. opening http://localhost:5006/?bokeh-session-id= gives me the plot. But Opening an URL http://localhost:5006/ doesn’t. Since, I am using sessions, I expect this to work this way. Anyone can help with another possible ways to do this?
Example of the script: https://github.com/kartikp1995/gr-htmlgui/blob/master/examples/top_block.py
Don’t worry about technical details. Just see that I am using self.session.show to view the HTML file.
You could name your session explicitly:
self.session = push_session(curdoc(), session_id = ‘my_id’)
``
Then the page should be accessible with:
http://localhost:5006/?bokeh-session-id=my_id
Daniel
···
Am Donnerstag, 2. März 2017 12:47:39 UTC+1 schrieb Kartik Patel:
Hello all,
Basically, I have a python script (can be more than one) each generates a plot. I have a common instance of document (recevied from curdoc())**in each of the scripts so that all plots are stored in one document. To view the plots for a given document, I am using session = push_session(curdoc()). And I can see the plot using session.show().
In this case, the problem is: I can’t access the plots without the long session key. i.e. opening http://localhost:5006/?bokeh-session-id= gives me the plot. But Opening an URL http://localhost:5006/ doesn’t. Since, I am using sessions, I expect this to work this way. Anyone can help with another possible ways to do this?
Example of the script: https://github.com/kartikp1995/gr-htmlgui/blob/master/examples/top_block.py
Don’t worry about technical details. Just see that I am using self.session.show to view the HTML file.
Hello Daniel,
Thank you very much. I was looking for exactly this. I tried to change the session ID after creating the session and was failed as expected but somehow missed this particular way.
Thank you again.
···
On 1:28am, Sat 04-Mar-2017 ‘Daniel Krause’ via Bokeh Discussion - Public, [email protected] wrote:
You could name your session explicitly:
self.session = push_session(curdoc(), session_id = ‘my_id’)
``
Then the page should be accessible with:
http://localhost:5006/?bokeh-session-id=my_id
Daniel
Am Donnerstag, 2. März 2017 12:47:39 UTC+1 schrieb Kartik Patel:
Hello all,
Basically, I have a python script (can be more than one) each generates a plot. I have a common instance of document (recevied from curdoc())**in each of the scripts so that all plots are stored in one document. To view the plots for a given document, I am using session = push_session(curdoc()). And I can see the plot using session.show().
In this case, the problem is: I can’t access the plots without the long session key. i.e. opening http://localhost:5006/?bokeh-session-id= gives me the plot. But Opening an URL http://localhost:5006/ doesn’t. Since, I am using sessions, I expect this to work this way. Anyone can help with another possible ways to do this?
Example of the script: https://github.com/kartikp1995/gr-htmlgui/blob/master/examples/top_block.py
Don’t worry about technical details. Just see that I am using self.session.show to view the HTML file.
–
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/sjsKF4y2pr8/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/0f91e724-5d9f-4d59-a7cb-7b0028ecbd2b%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
–
Regards,
Kartik Patel
B.Tech. Final Year
Electronics and Communication Engineering
Indian Institute of Technology, Roorkee