Error in all plotting samples

Hi.
I’ve an updated version of anaconda distribution and wanted to try some of the plotting examples rendered by server. Still all of the samples fail on the following point (below for burtin.py):

p = figure(…)

p.line(x+1, y+1, alpha=0)

with error:

AttributeError: ‘NoneType’ object has no attribute ‘line’

i.e. consistently p is None. I debugged it and got to the point inside figure(), inside curdoc()

doc = request.bokeh_server_document

which raises RuntimeError exception with message : working outside of request context

I’m running the provided file directly from prompt (no other fancy multithread scenario). python is 3.4.2 and flask is 0.10.1.

Any idea what I’m doing wrong ?

Thanks

Hi Ricardo,

There has been some recent API changes that are not forward-compatible. The examples in the GitHub repository are too new for bokeh 0.6.1 to be able to run. You can check out the previous examples by checking out the git tag:

  git checkout 0.6.1

An run the old versions of the examples with your bokeh 0.6.1 install. Alternatively, the 0.7 release should be available later tonight, and once it is installed the new versions of the examples will all run.

Thanks,

Bryan

···

On Dec 2, 2014, at 6:37 PM, [email protected] wrote:

Hi.
I've an updated version of anaconda distribution and wanted to try some of the plotting examples rendered by server. Still all of the samples fail on the following point (below for burtin.py):

p = figure(...)

p.line(x+1, y+1, alpha=0)

with error:

AttributeError: 'NoneType' object has no attribute 'line'

i.e. consistently p is None. I debugged it and got to the point inside figure(), inside curdoc()

doc = request.bokeh_server_document

which raises RuntimeError exception with message : working outside of request context

I'm running the provided file directly from prompt (no other fancy multithread scenario). python is 3.4.2 and flask is 0.10.1.
Any idea what I'm doing wrong ?

Thanks

--
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/db666334-5104-4f86-824a-1979b584a0d2%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hey Bryan,

I’m having a similar issue to Ricardo. All the examples don’t seem to work for me as well.

It looks like all the objects are None type and therefore bring up that attribute error.I tried using bokeh 0.6 and 0.8 on windows and unix.

Is this is same issue? Also I was unable to find any solid bokeh 0.60 exampels on github with that tag, would you happen to have a link?

Thanks

···

On Friday, December 5, 2014 at 4:41:10 PM UTC-8, Bryan Van de ven wrote:

Hi Ricardo,

There has been some recent API changes that are not forward-compatible. The examples in the GitHub repository are too new for bokeh 0.6.1 to be able to run. You can check out the previous examples by checking out the git tag:

    git checkout 0.6.1

An run the old versions of the examples with your bokeh 0.6.1 install. Alternatively, the 0.7 release should be available later tonight, and once it is installed the new versions of the examples will all run.

Thanks,

Bryan

On Dec 2, 2014, at 6:37 PM, [email protected] wrote:

Hi.

I’ve an updated version of anaconda distribution and wanted to try some of the plotting examples rendered by server. Still all of the samples fail on the following point (below for burtin.py):

p = figure(…)

p.line(x+1, y+1, alpha=0)

with error:

AttributeError: ‘NoneType’ object has no attribute ‘line’

i.e. consistently p is None. I debugged it and got to the point inside figure(), inside curdoc()

doc = request.bokeh_server_document

which raises RuntimeError exception with message : working outside of request context

I’m running the provided file directly from prompt (no other fancy multithread scenario). python is 3.4.2 and flask is 0.10.1.
Any idea what I’m doing wrong ?

Thanks


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/db666334-5104-4f86-824a-1979b584a0d2%40continuum.io.

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

Hi,

I'm not sure I follow. Are you using an old version of Bokeh (e.g., before 0.7)? Do you have to? If so, you can see examples appropriate for that version with URLS that include the tag, for example:

  https://github.com/bokeh/bokeh/tree/0.6.0/examples

You can see that the old API is different. For instance, if you look at

  https://github.com/bokeh/bokeh/blob/0.6.1/examples/plotting/file/line.py

Then you will see it looks like:

    import numpy as np
    from bokeh.plotting import *
    from bokeh.objects import PanTool
    N = 80

    x = np.linspace(0, 4*np.pi, N)
    y = np.sin(x)

    output_file("line.html", title="line.py example")

    pantool = PanTool(dimensions=["width", "height"])
    line(x,y, color="#0000FF", tools=['wheel_zoom','box_zoom', pantool],
         name="line_example")

    show()

which is *NOT* the new API. The new API has method calls on a figure object, i.e, "p.line(...)" which this example does not have.

If you are seeing the "AttributeError: 'NoneType' object has no attribute 'line'" exception, that 100% means you are running current examples with a very old version of Bokeh. You can verify that you are actually using he version of Bokeh that you think you are, by executing a command like:

  python -c "import bokeh; print(bokeh.__version__)"

on the command line.

If you really need to use the older version of Bokeh, then all the examples on the appropriate older tag will work. If not, then I have to assume there is something amiss (version mismatch) with your installation. In any case, for now I strongly recommend always using the latest version of Bokeh. Although we are making great strides towards stability and a 1.0 release, Bokeh is still a somewhat young project, and newer versions have many improvements, fixes, etc.

Thanks,

Bryan

···

On Mar 24, 2015, at 4:42 PM, [email protected] wrote:

Hey Bryan,

I'm having a similar issue to Ricardo. All the examples don't seem to work for me as well.

It looks like all the objects are None type and therefore bring up that attribute error.I tried using bokeh 0.6 and 0.8 on windows and unix.

Is this is same issue? Also I was unable to find any solid bokeh 0.60 exampels on github with that tag, would you happen to have a link?

Thanks

On Friday, December 5, 2014 at 4:41:10 PM UTC-8, Bryan Van de ven wrote:
Hi Ricardo,

There has been some recent API changes that are not forward-compatible. The examples in the GitHub repository are too new for bokeh 0.6.1 to be able to run. You can check out the previous examples by checking out the git tag:

        git checkout 0.6.1

An run the old versions of the examples with your bokeh 0.6.1 install. Alternatively, the 0.7 release should be available later tonight, and once it is installed the new versions of the examples will all run.

Thanks,

Bryan

> On Dec 2, 2014, at 6:37 PM, [email protected] wrote:
>
> Hi.
> I've an updated version of anaconda distribution and wanted to try some of the plotting examples rendered by server. Still all of the samples fail on the following point (below for burtin.py):
>
>
> p = figure(...)
>
> p.line(x+1, y+1, alpha=0)
>
> with error:
>
> AttributeError: 'NoneType' object has no attribute 'line'
>
> i.e. consistently p is None. I debugged it and got to the point inside figure(), inside curdoc()
>
> doc = request.bokeh_server_document
>
> which raises RuntimeError exception with message : working outside of request context
>
> I'm running the provided file directly from prompt (no other fancy multithread scenario). python is 3.4.2 and flask is 0.10.1.
> Any idea what I'm doing wrong ?
>
> Thanks
>
>
>
>
> --
> 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/db666334-5104-4f86-824a-1979b584a0d2%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/8f064f38-84e2-4a34-a1eb-23c829ac8779%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Also - I would recommend getting started with the non-server examples first. The flask request object isn’t used when you are plotting with bokeh at all - it is only used by the bokeh server

···

On Tue, Mar 24, 2015 at 5:59 PM, Bryan Van de Ven [email protected] wrote:

Hi,

I’m not sure I follow. Are you using an old version of Bokeh (e.g., before 0.7)? Do you have to? If so, you can see examples appropriate for that version with URLS that include the tag, for example:

    [https://github.com/bokeh/bokeh/tree/0.6.0/examples](https://github.com/bokeh/bokeh/tree/0.6.0/examples)

You can see that the old API is different. For instance, if you look at

    [https://github.com/bokeh/bokeh/blob/0.6.1/examples/plotting/file/line.py](https://github.com/bokeh/bokeh/blob/0.6.1/examples/plotting/file/line.py)

Then you will see it looks like:

import numpy as np

from bokeh.plotting import *

from bokeh.objects import PanTool

N = 80



x = np.linspace(0, 4*np.pi, N)

y = np.sin(x)



output_file("line.html", title="line.py example")



pantool = PanTool(dimensions=["width", "height"])

line(x,y, color="#0000FF", tools=['wheel_zoom','box_zoom', pantool],

     name="line_example")



show()

which is NOT the new API. The new API has method calls on a figure object, i.e, “p.line(…)” which this example does not have.

If you are seeing the “AttributeError: ‘NoneType’ object has no attribute ‘line’” exception, that 100% means you are running current examples with a very old version of Bokeh. You can verify that you are actually using he version of Bokeh that you think you are, by executing a command like:

    python -c "import bokeh; print(bokeh.__version__)"

on the command line.

If you really need to use the older version of Bokeh, then all the examples on the appropriate older tag will work. If not, then I have to assume there is something amiss (version mismatch) with your installation. In any case, for now I strongly recommend always using the latest version of Bokeh. Although we are making great strides towards stability and a 1.0 release, Bokeh is still a somewhat young project, and newer versions have many improvements, fixes, etc.

Thanks,

Bryan

On Mar 24, 2015, at 4:42 PM, [email protected] wrote:

Hey Bryan,

I’m having a similar issue to Ricardo. All the examples don’t seem to work for me as well.

It looks like all the objects are None type and therefore bring up that attribute error.I tried using bokeh 0.6 and 0.8 on windows and unix.

Is this is same issue? Also I was unable to find any solid bokeh 0.60 exampels on github with that tag, would you happen to have a link?

Thanks

On Friday, December 5, 2014 at 4:41:10 PM UTC-8, Bryan Van de ven wrote:

Hi Ricardo,

There has been some recent API changes that are not forward-compatible. The examples in the GitHub repository are too new for bokeh 0.6.1 to be able to run. You can check out the previous examples by checking out the git tag:

    git checkout 0.6.1

An run the old versions of the examples with your bokeh 0.6.1 install. Alternatively, the 0.7 release should be available later tonight, and once it is installed the new versions of the examples will all run.

Thanks,

Bryan

On Dec 2, 2014, at 6:37 PM, [email protected] wrote:

Hi.

I’ve an updated version of anaconda distribution and wanted to try some of the plotting examples rendered by server. Still all of the samples fail on the following point (below for burtin.py):

p = figure(…)

p.line(x+1, y+1, alpha=0)

with error:

AttributeError: ‘NoneType’ object has no attribute ‘line’

i.e. consistently p is None. I debugged it and got to the point inside figure(), inside curdoc()

doc = request.bokeh_server_document

which raises RuntimeError exception with message : working outside of request context

I’m running the provided file directly from prompt (no other fancy multithread scenario). python is 3.4.2 and flask is 0.10.1.

Any idea what I’m doing wrong ?

Thanks

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/db666334-5104-4f86-824a-1979b584a0d2%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/8f064f38-84e2-4a34-a1eb-23c829ac8779%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/0E5D1CDF-564D-4E28-9B02-F8452F275BE1%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.