Session error in updated bokeh_plots.py for streaming plots example

Hi,

I am trying to modify the “Streaming Plots” example to run on Bokeh 0.6.1 by removing the JSON aspects and plotting data directly from the SQLite database. I’m able to get a static plot to appear from the database but am having trouble getting the live update to work. In the last part of the bokeh_plots.py script I get the following error:

Traceback (most recent call last):

File “bokeh_plots_v3.py”, line 107, in

session().store_obj(ds)

TypeError: ‘Session’ object is not callable

This appears to be the command to update the data in the existing graph. I’ve attached my version of the bokeh_plots.py script in case that helps.

Thanks!

James

P.S. I’m pretty jazzed about using Bokeh in a number of projects and it would be great to solve this issue so that I can get the live streaming aspect working. I’ll then be able to update my current “intro” videos on Bokeh running on the Raspberry Pi and Wandboard (http://youtu.be/Y_bnjawTLxY and http://youtu.be/da_loaEaytc)

my_bokeh_plots.py (2.75 KB)

Hi,

···

On Fri, Oct 10, 2014 at 8:46 PM, James Smith [email protected] wrote:

Hi,

I am trying to modify the “Streaming Plots” example to run on Bokeh 0.6.1 by removing the JSON aspects and plotting data directly from the SQLite database. I’m able to get a static plot to appear from the database but am having trouble getting the live update to work. In the last part of the bokeh_plots.py script I get the following error:

Traceback (most recent call last):

File “bokeh_plots_v3.py”, line 107, in

session().store_obj(ds)

TypeError: ‘Session’ object is not callable

This line should be replaced with cursession().store_objects(ds). See [1] as an up-to-date example. Given this kind of errors, we may need to invest more in proper deprecation cycle and/or add migration guide.

[1] https://github.com/ContinuumIO/bokeh/blob/master/examples/plotting/server/line_animate.py

Mateusz

This appears to be the command to update the data in the existing graph. I’ve attached my version of the bokeh_plots.py script in case that helps.

Thanks!

James

P.S. I’m pretty jazzed about using Bokeh in a number of projects and it would be great to solve this issue so that I can get the live streaming aspect working. I’ll then be able to update my current “intro” videos on Bokeh running on the Raspberry Pi and Wandboard (http://youtu.be/Y_bnjawTLxY and http://youtu.be/da_loaEaytc)

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/1285cad6-97a5-4d06-9415-3375ad1b9a6e%40continuum.io.

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

FYI adding a library that can be used for real deprecations (marking both functions as well as module attrs) is on my list. It's a matter of when, not if. In the mean time we should strive to have better migration information in the release notes when appropriate.

Bryan

···

On Oct 10, 2014, at 6:56 PM, Mateusz Paprocki <[email protected]> wrote:

Hi,

On Fri, Oct 10, 2014 at 8:46 PM, James Smith <[email protected]> wrote:
Hi,

I am trying to modify the "Streaming Plots" example to run on Bokeh 0.6.1 by removing the JSON aspects and plotting data directly from the SQLite database. I'm able to get a static plot to appear from the database but am having trouble getting the live update to work. In the last part of the bokeh_plots.py script I get the following error:

Traceback (most recent call last):
  File "bokeh_plots_v3.py", line 107, in <module>
    session().store_obj(ds)
TypeError: 'Session' object is not callable

This line should be replaced with cursession().store_objects(ds). See [1] as an up-to-date example. Given this kind of errors, we may need to invest more in proper deprecation cycle and/or add migration guide.

[1] https://github.com/ContinuumIO/bokeh/blob/master/examples/plotting/server/line_animate.py

Mateusz

This appears to be the command to update the data in the existing graph. I've attached my version of the bokeh_plots.py script in case that helps.

Thanks!

James

P.S. I'm pretty jazzed about using Bokeh in a number of projects and it would be great to solve this issue so that I can get the live streaming aspect working. I'll then be able to update my current "intro" videos on Bokeh running on the Raspberry Pi and Wandboard (http://youtu.be/Y_bnjawTLxY and http://youtu.be/da_loaEaytc\)

--
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/1285cad6-97a5-4d06-9415-3375ad1b9a6e%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/CANFzp8jB77AuOsAMkDmmJdoY2-wkxWw416VSLLFP4CTmTQ8tSg%40mail.gmail.com\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Hi Mateusz and Bryan,

Thanks for the help. I was able to get it to work – at least the animations work. My code is still “clunky” but it works enough for me to consider this a first milestone before my next revision. I’ve included the code and am uploading a Youtube video of it in action as I type this (http://youtu.be/yLP4DxHx0jM). It’s not nearly as pretty as the other example Bokeh graphs, but I will continue working on it.

thanks again for the help!

James

serialport_scatter_animate_v5.py (3.21 KB)

···

On Friday, October 10, 2014 2:46:40 PM UTC-4, James Smith wrote:

Hi,

I am trying to modify the “Streaming Plots” example to run on Bokeh 0.6.1 by removing the JSON aspects and plotting data directly from the SQLite database. I’m able to get a static plot to appear from the database but am having trouble getting the live update to work. In the last part of the bokeh_plots.py script I get the following error:

Traceback (most recent call last):

File “bokeh_plots_v3.py”, line 107, in

session().store_obj(ds)

TypeError: ‘Session’ object is not callable

This appears to be the command to update the data in the existing graph. I’ve attached my version of the bokeh_plots.py script in case that helps.

Thanks!

James

P.S. I’m pretty jazzed about using Bokeh in a number of projects and it would be great to solve this issue so that I can get the live streaming aspect working. I’ll then be able to update my current “intro” videos on Bokeh running on the Raspberry Pi and Wandboard (http://youtu.be/Y_bnjawTLxY and http://youtu.be/da_loaEaytc)