Running Bokeh server on Django application

I was following this tutorial

Enter code here…bokeh/standalone_embed.py at branch-3.0 · bokeh/bokeh · GitHub

``

When I add this code the view.py within my bokeh app and tried to run it. I received an error that says

Enter code here…
File “C:\Users\ktadesse\Desktop\Project\Webpageranking\webranking\webranking\urls.py”, line 18, in

``
from bokeh_app import views

File “C:\Users\ktadesse\Desktop\Project\Webpageranking\webranking\bokeh_app\views.py”, line 98, in

server = Server({’/’:modify_doc}, num_procs=4)

File “C:\Users\ktadesse\Miniconda3\envs\Webranking\lib\site-packages\bokeh\server\server.py”, line 394, in init

raise RuntimeError(“num_procs > 1 not supported on Windows”)

RuntimeError: num_procs > 1 not supported on Windows

Everything works properly on bokeh server. I am trying to make it work with Django. Please if you have any suggestion or example online let me know.

What happens if you follow the suggestion in the error message and change Server({'/': modify_doc}, num_procs=4) to Server({'/': modify_doc}, num_procs=1)

···

On Tuesday, November 13, 2018 at 3:53:01 PM UTC-6, Kirubel Tadesse wrote:

I was following this tutorial

Enter code here…https://github.com/bokeh/bokeh/blob/master/examples/howto/server_embed/standalone_embed.py

``

When I add this code the view.py within my bokeh app and tried to run it. I received an error that says

Enter code here…
File “C:\Users\ktadesse\Desktop\Project\Webpageranking\webranking\webranking\urls.py”, line 18, in

``
from bokeh_app import views

File “C:\Users\ktadesse\Desktop\Project\Webpageranking\webranking\bokeh_app\views.py”, line 98, in

server = Server({‘/’:modify_doc}, num_procs=4)

File “C:\Users\ktadesse\Miniconda3\envs\Webranking\lib\site-packages\bokeh\server\server.py”, line 394, in init

raise RuntimeError(“num_procs > 1 not supported on Windows”)

RuntimeError: num_procs > 1 not supported on Windows

Everything works properly on bokeh server. I am trying to make it work with Django. Please if you have any suggestion or example online let me know.

Hi Sarah,

I am trying to follow that link for Django application I tried doing that and I am still getting the same error

http://localhost:5006/bokeh_app/histogram/autoload.js?bokeh-autoload-element=1002&bokeh-app-path=/bokeh_app/histogram&bokeh-absolute-url=http://localhost:5006/bokeh_app/histogram

``

Here is the main resource that I am using

https://parambokeh.pyviz.org/user_guide/Django_Apps.html

``

I don’t think I need ssl and proxy configuration right?

I am also seeing that on another example

``

Thank you for your help!

···

On Tuesday, November 13, 2018 at 5:52:40 PM UTC-5, Sarah Bird wrote:

What happens if you follow the suggestion in the error message and change Server({'/': modify_doc}, num_procs=4) to Server({'/': modify_doc}, num_procs=1)

On Tuesday, November 13, 2018 at 3:53:01 PM UTC-6, Kirubel Tadesse wrote:

I was following this tutorial

Enter code here…https://github.com/bokeh/bokeh/blob/master/examples/howto/server_embed/standalone_embed.py

``

When I add this code the view.py within my bokeh app and tried to run it. I received an error that says

Enter code here…
File “C:\Users\ktadesse\Desktop\Project\Webpageranking\webranking\webranking\urls.py”, line 18, in

``
from bokeh_app import views

File “C:\Users\ktadesse\Desktop\Project\Webpageranking\webranking\bokeh_app\views.py”, line 98, in

server = Server({‘/’:modify_doc}, num_procs=4)

File “C:\Users\ktadesse\Miniconda3\envs\Webranking\lib\site-packages\bokeh\server\server.py”, line 394, in init

raise RuntimeError(“num_procs > 1 not supported on Windows”)

RuntimeError: num_procs > 1 not supported on Windows

Everything works properly on bokeh server. I am trying to make it work with Django. Please if you have any suggestion or example online let me know.