Error running example code

I’m attempting to get up and going with Bokeh, but am having trouble verifying the installation as per the Getting Set Up page.

“The first check you can make is to make sure you can import bokeh and verify bokeh.__version__ from a running python interpreter.”

This returns 0.12.5, so I think that part is good.

“The next check you can make is to produce a very simple plot…”

from bokeh.plotting import figure, output_file, show
output_file("test.html")
p = figure()
p.line([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], line_width=2)
show(p)

Returns this error:

Traceback (most recent call last):

File “/Users/sl/Desktop/another test.py”, line 1, in

from bokeh.plotting import figure, output_file, show

File “/Users/sl/anaconda/lib/python3.6/site-packages/bokeh/plotting/init.py”, line 2, in

from ..document import Document; Document

File “/Users/sl/anaconda/lib/python3.6/site-packages/bokeh/document.py”, line 28, in

from .core.json_encoder import serialize_json

File “/Users/sl/anaconda/lib/python3.6/site-packages/bokeh/core/json_encoder.py”, line 47, in

from ..util.serialization import transform_series, transform_array

File “/Users/sl/anaconda/lib/python3.6/site-packages/bokeh/util/serialization.py”, line 39, in

__doc__ = __doc__ % ("\n".join("* ``np." + str(x) + "``" for x in BINARY_ARRAY_TYPES))

TypeError: unsupported operand type(s) for %: ‘NoneType’ and ‘str’

[Finished in 0.6s with exit code 1]

[shell_cmd: python3 -OO -u “/Users/sl/Desktop/another test.py”]

[dir: /Users/sl/Desktop]

[path: /usr/bin:/bin:/usr/sbin:/sbin]

Usually I can Google through errors, but I haven’t found any solutions for this. Any help is much appreciated.

OSX, Python 3.6

Hi,

Don't run with -OO until the next release:

  https://github.com/bokeh/bokeh/issues/6156
  https://github.com/bokeh/bokeh/pull/6157

Thanks,

Bryan

···

On Apr 23, 2017, at 17:31, SL36 <[email protected]> wrote:

I'm attempting to get up and going with Bokeh, but am having trouble verifying the installation as per the Getting Set Up page.

"The first check you can make is to make sure you can import bokeh and verify bokeh.__version__ from a running python interpreter."

This returns 0.12.5, so I think that part is good.

"The next check you can make is to produce a very simple plot..."

from bokeh.plotting import figure, output_file, show
output_file("test.html")
p = figure()
p.line([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], line_width=2)
show(p)

Returns this error:

Traceback (most recent call last):
  File "/Users/sl/Desktop/another test.py", line 1, in <module>
    from bokeh.plotting import figure, output_file, show
  File "/Users/sl/anaconda/lib/python3.6/site-packages/bokeh/plotting/__init__.py", line 2, in <module>
    from ..document import Document; Document
  File "/Users/sl/anaconda/lib/python3.6/site-packages/bokeh/document.py", line 28, in <module>
    from .core.json_encoder import serialize_json
  File "/Users/sl/anaconda/lib/python3.6/site-packages/bokeh/core/json_encoder.py", line 47, in <module>
    from ..util.serialization import transform_series, transform_array
  File "/Users/sl/anaconda/lib/python3.6/site-packages/bokeh/util/serialization.py", line 39, in <module>
    __doc__ = __doc__ % ("\n".join("* ``np." + str(x) + "``" for x in BINARY_ARRAY_TYPES))
TypeError: unsupported operand type(s) for %: 'NoneType' and 'str'
[Finished in 0.6s with exit code 1]
[shell_cmd: python3 -OO -u "/Users/sl/Desktop/another test.py"]
[dir: /Users/sl/Desktop]
[path: /usr/bin:/bin:/usr/sbin:/sbin]

Usually I can Google through errors, but I haven't found any solutions for this. Any help is much appreciated.

OSX, Python 3.6

--
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/ea58e2cd-74ee-4369-bc11-924b1ffb0a3c%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.