How to setup surface3d example

Hello,

I am trying to start the surface3d example: https://github.com/bokeh/bokeh/tree/master/examples/app/surface3d

However because of the lack of documentation and my inexperience with both Python and nodejs, I did not find a way to launch it.

I am currently working on Windows with Powershell.

I tried those steps some might be unnecessary :

$ git clone GitHub - bokeh/bokeh: Interactive Data Visualization in the browser, from Python

$ cd bokeh\examples\app\

$ python3.7 -m venv env.\env\bin\Activate.ps1

$ python -m pip install bokeh

$ npm install vis

$ npm install bokehjs

$ python -m bokeh serve --show surface3d

A new page in my browser opens with a “500: Internal Server Error” message.

The python interpreter returns:

2019-02-03 12:56:32,131 Starting Bokeh server version 1.0.4 (running on Tornado 5.1.1)
2019-02-03 12:56:32,135 Bokeh app running at: http://localhost:5006/surface3d
2019-02-03 12:56:32,136 Starting Bokeh server with process id: 7440
2019-02-03 12:56:33,549 Uncaught exception GET /surface3d (127.0.0.1)
HTTPServerRequest(protocol=‘http’, host=‘localhost:5006’, method=‘GET’, uri=‘/surface3d’, version=‘HTTP/1.1’, remote_ip=‘127.0.0.1’)
Traceback (most recent call last):
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\tornado\web.py”, line 1592, in _execute
result = yield result
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\tornado\gen.py”, line 1133, in run
value = future.result()
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\tornado\gen.py”, line 1147, in run
yielded = self.gen.send(value)
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\server\views\doc_handler.py”, line 61, in get
template_variables=session.document.template_variables)
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\embed\server.py”, line 229, in server_html_page_for_session
template=template, template_variables=template_variables)
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\embed\elements.py”, line 104, in html_page_for_render_items
script = bundle_all_models()
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\util\compiler.py”, line 412, in bundle_all_models
_bundle_cache[key] = bundle = bundle_models(Model.model_class_reverse_map.values()) or “”
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\util\compiler.py”, line 359, in bundle_models
deps_map = resolve_deps(compiled.deps, model.path)
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\util\compiler.py”, line 355, in resolve_deps
return resolve_modules(missing, root)
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\util\compiler.py”, line 348, in resolve_modules
raise RuntimeError(“no such module: %s” % module)
RuntimeError: no such module: models/layouts/html_box
2019-02-03 12:56:33,554 500 GET /surface3d (127.0.0.1) 847.52ms

I also tried npm install from inside the surface3d directory and obtained the same result.

I realized npm was absolutely unnecessary.

I still have the same issue with:

  • Windows/Powershell
  • Windows/WSL-debian-Bash
  • ArchLinux/zsh

Steps:

$ git clone https://github.com/bokeh/bokeh.git
$ cd bokeh/examples/app/
$ python3 -m venv env
$ source ./env/bin/activate
$ python3 -m pip install bokeh
$ python3 -m bokeh serve --show surface3d

However this example is working out of the box: https://bokeh.pydata.org/en/latest/docs/user_guide/extensions_gallery/wrapping.html

···

On Sunday, 3 February 2019 15:56:45 UTC+1, Jean Fauquenot wrote:

Hello,

I am trying to start the surface3d example: https://github.com/bokeh/bokeh/tree/master/examples/app/surface3d

However because of the lack of documentation and my inexperience with both Python and nodejs, I did not find a way to launch it.

I am currently working on Windows with Powershell.

I tried those steps some might be unnecessary :

$ git clone https://github.com/bokeh/bokeh.git

$ cd bokeh\examples\app\

$ python3.7 -m venv env.\env\bin\Activate.ps1

$ python -m pip install bokeh

$ npm install vis

$ npm install bokehjs

$ python -m bokeh serve --show surface3d

A new page in my browser opens with a “500: Internal Server Error” message.

The python interpreter returns:

2019-02-03 12:56:32,131 Starting Bokeh server version 1.0.4 (running on Tornado 5.1.1)
2019-02-03 12:56:32,135 Bokeh app running at: http://localhost:5006/surface3d
2019-02-03 12:56:32,136 Starting Bokeh server with process id: 7440
2019-02-03 12:56:33,549 Uncaught exception GET /surface3d (127.0.0.1)
HTTPServerRequest(protocol=‘http’, host=‘localhost:5006’, method=‘GET’, uri=‘/surface3d’, version=‘HTTP/1.1’, remote_ip=‘127.0.0.1’)
Traceback (most recent call last):
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\tornado\web.py”, line 1592, in _execute
result = yield result
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\tornado\gen.py”, line 1133, in run
value = future.result()
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\tornado\gen.py”, line 1147, in run
yielded = self.gen.send(value)
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\server\views\doc_handler.py”, line 61, in get
template_variables=session.document.template_variables)
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\embed\server.py”, line 229, in server_html_page_for_session
template=template, template_variables=template_variables)
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\embed\elements.py”, line 104, in html_page_for_render_items
script = bundle_all_models()
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\util\compiler.py”, line 412, in bundle_all_models
_bundle_cache[key] = bundle = bundle_models(Model.model_class_reverse_map.values()) or “”
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\util\compiler.py”, line 359, in bundle_models
deps_map = resolve_deps(compiled.deps, model.path)
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\util\compiler.py”, line 355, in resolve_deps
return resolve_modules(missing, root)
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\util\compiler.py”, line 348, in resolve_modules
raise RuntimeError(“no such module: %s” % module)
RuntimeError: no such module: models/layouts/html_box
2019-02-03 12:56:33,554 500 GET /surface3d (127.0.0.1) 847.52ms

I also tried npm install from inside the surface3d directory and obtained the same result.

Thanks to @xavArtley on the gitter channel I figured it out :

The required bokeh version to run examples from master repo is 1.1.dev2, the bokeh version on pypi is 1.0.4.

You can either clone the appropriate version (which I did):

git clone https://github.com/bokeh/bokeh.git -b 1.0.4

Or run the examples directly from the library downloaded with pip.

Or install the python module from the sources:

···
cd bokehjs
npm install --no-save
cd..
python setup.py install (or develop)

On Monday, 4 February 2019 13:09:33 UTC+1, Jean Fauquenot wrote:

I realized npm was absolutely unnecessary.

I still have the same issue with:

  • Windows/Powershell
  • Windows/WSL-debian-Bash
  • ArchLinux/zsh

Steps:

$ git clone https://github.com/bokeh/bokeh.git
$ cd bokeh/examples/app/
$ python3 -m venv env
$ source ./env/bin/activate
$ python3 -m pip install bokeh
$ python3 -m bokeh serve --show surface3d

However this example is working out of the box: https://bokeh.pydata.org/en/latest/docs/user_guide/extensions_gallery/wrapping.html

On Sunday, 3 February 2019 15:56:45 UTC+1, Jean Fauquenot wrote:

Hello,

I am trying to start the surface3d example: https://github.com/bokeh/bokeh/tree/master/examples/app/surface3d

However because of the lack of documentation and my inexperience with both Python and nodejs, I did not find a way to launch it.

I am currently working on Windows with Powershell.

I tried those steps some might be unnecessary :

$ git clone https://github.com/bokeh/bokeh.git

$ cd bokeh\examples\app\

$ python3.7 -m venv env.\env\bin\Activate.ps1

$ python -m pip install bokeh

$ npm install vis

$ npm install bokehjs

$ python -m bokeh serve --show surface3d

A new page in my browser opens with a “500: Internal Server Error” message.

The python interpreter returns:

2019-02-03 12:56:32,131 Starting Bokeh server version 1.0.4 (running on Tornado 5.1.1)
2019-02-03 12:56:32,135 Bokeh app running at: http://localhost:5006/surface3d
2019-02-03 12:56:32,136 Starting Bokeh server with process id: 7440
2019-02-03 12:56:33,549 Uncaught exception GET /surface3d (127.0.0.1)
HTTPServerRequest(protocol=‘http’, host=‘localhost:5006’, method=‘GET’, uri=‘/surface3d’, version=‘HTTP/1.1’, remote_ip=‘127.0.0.1’)
Traceback (most recent call last):
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\tornado\web.py”, line 1592, in _execute
result = yield result
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\tornado\gen.py”, line 1133, in run
value = future.result()
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\tornado\gen.py”, line 1147, in run
yielded = self.gen.send(value)
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\server\views\doc_handler.py”, line 61, in get
template_variables=session.document.template_variables)
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\embed\server.py”, line 229, in server_html_page_for_session
template=template, template_variables=template_variables)
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\embed\elements.py”, line 104, in html_page_for_render_items
script = bundle_all_models()
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\util\compiler.py”, line 412, in bundle_all_models
_bundle_cache[key] = bundle = bundle_models(Model.model_class_reverse_map.values()) or “”
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\util\compiler.py”, line 359, in bundle_models
deps_map = resolve_deps(compiled.deps, model.path)
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\util\compiler.py”, line 355, in resolve_deps
return resolve_modules(missing, root)
File “D:\projects\ggj\bokeh_test\env\lib\site-packages\bokeh\util\compiler.py”, line 348, in resolve_modules
raise RuntimeError(“no such module: %s” % module)
RuntimeError: no such module: models/layouts/html_box
2019-02-03 12:56:33,554 500 GET /surface3d (127.0.0.1) 847.52ms

I also tried npm install from inside the surface3d directory and obtained the same result.