server plotting: blank figure the second time

Hi, thanks for the good work, this project is impressive and I can think of many great uses in the climate science world.

I’m in the process of learning how to use it, and I just bumped into something weird.

I’ve put together a simple scatter plot example using Glyphs to illustrate that (attached).

$ bokeh-server # is launched, then in a new terminal

$ python test_server.py

Then visiting the link http://localhost:5006/bokeh/doc/…, everything looks as expected.

But if I execute python test_server.py a second time, the plot becomes blank (well, only the data part of it, the title and - I also tried - the tools still appears).

Restarting the bokeh server does not help.

I need to change the document name (session.use_doc) to make it work.

I could put a 10 digits random number generator for the document name, but there is probably a better solution :wink:

Any hint?

Sorry if I am missing something obvious, I am not at all familiar with web protocols, and already spend some time tracking down the problem to document name…

Thanks !

M

test_server.py (962 Bytes)

I should have mentioned, I’m using version 0.5.1, compiled from source with python setup.py install, Ubuntu 14.04

Here a slightly more advanced version with a text input box, using embed.autoload_server
Same story, the version I attached only works the first time (the plot also refreshes correctly when the seed text box is updated).

But if I stop the loop (Ctrl+C) and start it again. The drawing area of the plot will be blank.

Now something new : if I close the plot (clicking on “Close All Plots”) then execute the script again, the plot will show up correctly again.

I’m going to look for a way of doing that automatically.

The strange thing is that I did not encounter this problem in the bokeh examples (e.g. taylor_server.py runs fine regardless of how often I started it)

Would be great to hear what you think might hide under this…

test_server.py (2.25 KB)

···

On Tuesday, August 5, 2014 12:20:11 PM UTC+2, [email protected] wrote:

Hi, thanks for the good work, this project is impressive and I can think of many great uses in the climate science world.

I’m in the process of learning how to use it, and I just bumped into something weird.

I’ve put together a simple scatter plot example using Glyphs to illustrate that (attached).

$ bokeh-server # is launched, then in a new terminal

$ python test_server.py

Then visiting the link http://localhost:5006/bokeh/doc/…., everything looks as expected.

But if I execute python test_server.py a second time, the plot becomes blank (well, only the data part of it, the title and - I also tried - the tools still appears).

Restarting the bokeh server does not help.

I need to change the document name (session.use_doc) to make it work.

I could put a 10 digits random number generator for the document name, but there is probably a better solution :wink:

Any hint?

Sorry if I am missing something obvious, I am not at all familiar with web protocols, and already spend some time tracking down the problem to document name…

Thanks !

M

Ok, apparently this has to do with the initialization of the Circle Glyph.
Passing a few arguments like radius=0.1, fill_color=‘blue’ solves the issue.

I guess this is a bug.

Mahe,

It's quite possible, can you submit a Github issue with this information and any code to reproduce that you can share?

Thanks!

Bryan

···

On Aug 5, 2014, at 12:38 PM, [email protected] wrote:

Ok, apparently this has to do with the initialization of the Circle Glyph.
Passing a few arguments like radius=0.1, fill_color='blue' solves the issue.
I guess this is a bug.

--
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/333a5578-a2d9-407b-98d7-7f23aa31a64c%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi Bryan,

ok, I just did

https://github.com/ContinuumIO/bokeh/issues/963

Cheers

···

On Tuesday, August 5, 2014 2:01:05 PM UTC+2, Bryan Van de ven wrote:

Mahe,

It’s quite possible, can you submit a Github issue with this information and any code to reproduce that you can share?

Thanks!

Bryan

On Aug 5, 2014, at 12:38 PM, [email protected] wrote:

Ok, apparently this has to do with the initialization of the Circle Glyph.
Passing a few arguments like radius=0.1, fill_color=‘blue’ solves the issue.
I guess this is a bug.


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/333a5578-a2d9-407b-98d7-7f23aa31a64c%40continuum.io.

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