Damián,
I tried the new examples, and I still get the 404 errors. In the new examples, I don't see where you specify the path to the static directory?
Note that when running this in production using 0.4.4 I have a tmp directory that is a child of the explicitly defined static directory in order to clean up all the dynamically generated plot js files, otherwise all the requests that we have daily to our application would fill up our disk with the dynamically generated js files (or has that methodology been replaced with the latest version?). I have a cron job that cleans out the plot specific tmp directory hourly.
I don't see where I can do that in the new examples - all that is there is now a method called autoload_server. The autoload_static method has been removed from the example script.
Finally, the README.md (https://github.com/ContinuumIO/bokeh/tree/master/examples/embed\) says:
To see these example you first have to start the bokeh-server, ie.:
$./bokeh-server --backend=memory
in the top level bokeh directory. For widget.py and animated.py use the links provided when you run the script. For app_reveal.py, navigate to
http://127.0.0.1:5000/
With the old release (0.4.4) I would just run:
$ python app_reveal.py
And it would open up port 5000 just fine. Now I get:
$ python app_reveal.py
Using saved session configuration for http://localhost:5006/
To override, pass 'load_from_config=False' to Session
Traceback (most recent call last):
File "app_reveal.py", line 213, in <module>
pop = Population()
File "app_reveal.py", line 116, in __init__
self.session.use_doc('population_reveal')
File "/path/src/bokeh/bokeh/session.py", line 314, in use_doc
self.docid = self.find_doc(name)
File "/path/src/bokeh/bokeh/session.py", line 295, in find_doc
docs = self.userinfo.get('docs')
File "/path/src/bokeh/bokeh/session.py", line 258, in userinfo
self._userinfo = self.get_json(url)
File "/path/src/bokeh/bokeh/session.py", line 249, in get_json
return self.execute_json('get', url, headers=headers, **kwargs)
File "/path/src/bokeh/bokeh/session.py", line 241, in execute_json
resp = func(url, headers=headers, **kwargs)
File "/path/lib/python2.7/site-packages/requests/sessions.py", line 468, in get
return self.request('GET', url, **kwargs)
File "/path/lib/python2.7/site-packages/requests/sessions.py", line 456, in request
resp = self.send(prep, **send_kwargs)
File "/path/lib/python2.7/site-packages/requests/sessions.py", line 559, in send
r = adapter.send(request, **kwargs)
File "/path/lib/python2.7/site-packages/requests/adapters.py", line 375, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=5006): Max retries exceeded with url: /bokeh/userinfo/ (Caused by <class 'socket.error'>: [Errno 61] Connection refused)
If I specify the arg:
load_from_config=False
in the call to Session as suggested in the STDOUT:
OLD (from Github):
self.session = Session()
NEW (my update based on STDOUT msg above):
self.session = Session(load_from_config=False)
I get the following:
$ python app_reveal.py
Traceback (most recent call last):
File "app_reveal.py", line 213, in <module>
pop = Population()
File "app_reveal.py", line 116, in __init__
self.session.use_doc('population_reveal')
File "/path/src/bokeh/bokeh/session.py", line 314, in use_doc
self.docid = self.find_doc(name)
File "/path/src/bokeh/bokeh/session.py", line 295, in find_doc
docs = self.userinfo.get('docs')
File "/path/src/bokeh/bokeh/session.py", line 258, in userinfo
self._userinfo = self.get_json(url)
File "/path/src/bokeh/bokeh/session.py", line 249, in get_json
return self.execute_json('get', url, headers=headers, **kwargs)
File "/path/src/bokeh/bokeh/session.py", line 241, in execute_json
resp = func(url, headers=headers, **kwargs)
File "/path/lib/python2.7/site-packages/requests/sessions.py", line 468, in get
return self.request('GET', url, **kwargs)
File "/path/lib/python2.7/site-packages/requests/sessions.py", line 456, in request
resp = self.send(prep, **send_kwargs)
File "/path/lib/python2.7/site-packages/requests/sessions.py", line 559, in send
r = adapter.send(request, **kwargs)
File "/path/lib/python2.7/site-packages/requests/adapters.py", line 375, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=5006): Max retries exceeded with url: /bokeh/userinfo/ (Caused by <class 'socket.error'>: [Errno 61] Connection refused)
I don't want to use the built in bokeh server, because this application gets deployed on a production host in a virtualenv using wsgi running under Apache.
Thanks for the help,
- Rob N
On Jul 15, 2014, at 10:30 AM, Damian Avila <[email protected]> wrote:
The url for the embed example is https://github.com/ContinuumIO/bokeh/tree/master/examples/embed
You can see there the updated example... probably your feeling is correct. Try the new examples and let me know...
Cheers.
On Tue, Jul 15, 2014 at 2:13 PM, robertlnewman <[email protected]> wrote:
Hi Damián,
What is the URL for the updated example? I don't see it anymore in either your fork, not the master Bokeh repo.
The error I am getting is that the plots are not generated. If I look at the URL's for the dynamically generated JS (under /static/js), I get 404's, even though they are present on my file system. I get the feeling that the Bokeh server is "looking" in the wrong location for statically generated files.
Thanks for the prompt reply,
- Rob N
On Jul 15, 2014, at 10:07 AM, Damian Avila <[email protected]> wrote:
Hi Rob,
The example was updated too... what is exactly failing for you?
Do you have a traceback available?
Cheers.
Damián.
On Tue, Jul 15, 2014 at 2:00 PM, robertlnewman <[email protected]> wrote:
Hi All,
I have been using Damian Avila's May 23rd example embed script as a way of getting Bokeh to work with Flask and display data direct from Postgres:
Added embed example. · damianavila/bokeh@d1fdb51 · GitHub
Since the release of Bokeh 0.5.0 this example no longer works for me. I am not entirely sure what changed, as all the changelog lists (http://bokeh.pydata.org/docs/release_notes.html#v0-5-0-jul-2014\):
v0.5.0 (Jul 2014)
• Widgets
• Initial AR integration
• bokeh.charts (scatter, bar, histogram)
• improved embedding API
• minor ticks, plot frame, and log axes
This doesn't really give me a granular view of which methods in Bokeh have changed and leaves me with no option but to go through the Git commits to try and figure out what changed and when. I really don't have the time for that because I am bootstrapping a UI for Postgres data. Right now I am tethered to the 0.4.4 release on my production box, and cannot upgrade.
All help appreciated.
Thanks in advance,
- Rob N
--
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/F7768E58-031D-4D40-B265-C7F5600756E6%40gmail.com\.
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/CAM9Ly3EGLSV-PvGJOmvDZEmRU2%3D0PEdjP09G7w%2B5pwjx1XtB3w%40mail.gmail.com\.
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/09C6AB65-F010-4C2D-B8EC-C224FC3CF70A%40gmail.com\.
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/CAM9Ly3G7_6d0mn5O3Q-qWOwJVu%3DaanqGDzCjm0tONgiEYyerpQ%40mail.gmail.com\.
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/EAA774BF-6BEC-439E-ABD2-6ABFB0E187CF%40gmail.com\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.