Need help with Bokeh rendering on Cloud9


#1

I cannot get Bokeh, a major graphics package for Python to render on Cloud9.

I have a large scale demo that I need to present ASAP, Please help.


#2

what issue do you see? Does bokeh generate the html file? If yes use cloud9 preview to view it.


#3

thank you so much for replying … i am really desparare. Boken generates an output html file. but has a show command that is suppose to open up a new browser window and render the html file. Bokeh also has a server that handles interactive html.
in both cases the show command and the server do not work …i have been round and round with Bokeh tech support and all they say is that it works for them.my cloud9 account is mgmoulton@opusnet.com … pswrd a11b23z58 … in python1/python_swagger/BokehTest.pyit is a six line python progran that draws circles … cloud9 creates blue screens python3 BokenTest.pyi know my request is maybe out of line but a have several thousand lines of python code with boken that i have to get running on cloud9 …please contact me if you need more info …thank you marx-----Original Message-----
Sent 12/3/2017 1:30:43 PM


#4

To use the bokeh server you need to launch it on port 8080 and ip 0.0.0.0
the show command won’t work, bacause it is trying to open the browser on the vm instead of your desktop.

btw you probably should change your password since you have posted it on a public mailing list.


#5

I am not a server guy , but a windows desktop developer …

I am sorry to be so dense but how do I launch it on port 8080 and ip 0,0,0,0?


#6

i managed to get it to work by running

bokeh serve --port=8080  --allow-websocket-origin=$C9_HOSTNAME myApp.py 

and opening the application preview


#7

Thank you but when I tried this from my account it said port 8080 already in use …

could you please look at this again? … you are probably really close …

this is super important at least for me …


#8

this is the attempt and response …

bokeh serve --port=8080 --allow-websocket-origin=$C9_HOSTNAME BokehTest.py
2017-12-04 18:41:51,078 Starting Bokeh server version 0.12.10 (running on Tornado 4.3)
2017-12-04 18:41:51,079 Cannot start Bokeh server, port 8080 is already in use


#9

you must be running something else on that port, kill other programs and try again

you can either use process list from tools menu or run the following command in terminal

kill -9 $(lsof -i:$PORT -t)

#10

Ok , I got Port 8080 open, but the Bokeh server just hangs with no new tab window and display. If you got this to work we must be really close:

mgmoulton:~/workspace/python_swagger $ bokeh serve --port=8080 --allow-websocket-origin=$C9_HOSTNAME BokehTest.py
2017-12-04 19:55:06,797 Starting Bokeh server version 0.12.10 (running on Tornado 4.3)
2017-12-04 19:55:06,800 Bokeh app running at: http://localhost:8080/BokehTest
2017-12-04 19:55:06,801 Starting Bokeh server with process id: 1564

Please do not give up … we are really close … the BokehTest.py is example code from the Bokeh website.


#11

Ok , I got Port 8080 open, but the Bokeh server just hangs with no new tab window and display. If you got this to work we must be really close:mgmoulton:~/workspace/python_swagger $ bokeh serve --port=8080 --allow-websocket-origin=$C9_HOSTNAME BokehTest.py
2017-12-04 19:55:06,797 Starting Bokeh server version 0.12.10 (running on Tornado 4.3)
2017-12-04 19:55:06,800 Bokeh app running at: http://localhost:8080/BokehTest
2017-12-04 19:55:06,801 Starting Bokeh server with process id: 1564Please do not give up … we are really close … the BokehTest.py is example code from the Bokeh website.


#12

open the application preview


#13

I opened the BokehTest.py application preview off the file tree and got a blank screen.


#14

that’s the file preview, use preview>preview running application menu item


#15

Still got a blank screen. Apparently the Bokeh show§ command is ignored by the server. Have you gotten Bokeh to show any graphs on your tests? bokeh serve --port=8080 --allow-websocket-origin=$C9_HOSTNAME BokehTest.py 2017-12-04 20:17:58,138 Starting Bokeh server version 0.12.10 (running on Tornado 4.3)2017-12-04 20:17:58,141 Bokeh app running at: http://localhost:8080/BokehTest2017-12-04 20:17:58,141 Starting Bokeh server with process id: 17692017-12-04 20:18:04,422 302 GET / (10.240.0.91) 1.18ms2017-12-04 20:18:04,751 /home/ubuntu/workspace/python_swagger/BokehTest.py: call to show() ignored when running scripts with the ‘bokeh’ command.2017-12-04 20:18:04,759 200 GET /BokehTest (10.240.0.91) 122.75ms2017-12-04 20:18:05,482 WebSocket connection opened2017-12-04 20:18:05,482 ServerConnection created2017-12-04 20:18:23,050 WebSocket connection closed: code=1001, reason=None


#16

I am using Chrome and it just keeps downloading BokehTest.py instead of opening a tab for display …


#17

it worked for the sample app from the tutorial.
What url are you opening, and what is your workspace url?


#18

workspace:
https://ide.c9.io/mgmoulton/python1

I am runningmgmoulton:~/workspace/python_swagger $ bokeh serve --port=8080 --allow-websocket-origin=$C9_HOSTNAME BokehTest.py 2017-12-04 22:00:21,712 Starting Bokeh server version 0.12.10 (running on Tornado 4.3)2017-12-04 22:00:21,716 Bokeh app running at: http://localhost:8080/BokehTest2017-12-04 22:00:21,716 Starting Bokeh server with process id: 2429Preview browser tab:https://python1-mgmoulton.c9users.io/BokehTestCould you please send me the tutorial example python code you are running?


#19

Maybe the problem is the browser. What browser are you using?
Can you send the example program that worked for you?


#20

What browser are you using?

Can you send me the sample app that works?