Happiness example replacement

Hello,

The Happiness demo app seems to be a useful example that is relevant to my use case for Bokeh. It currently states it is outdated and refers to Bokeh/bokeh/examples as a source of updated examples.

However in reading through these examples I’m not able to find any similarly comprehensive web app style demos.

Could you please direct me to one (if available)? Or advise me when one similar to Happiness will be available?

Cheers,

Joshua

Hello,

I would like to support this request. I have built an application following Happiness but I realized aterwards that this is not the suggested way to work with the Bockeh server.

For me it would be important to have an example having the best practices we should use in an app Bokeh server + Flask (or Django).

Regards,

Ghislardo

Hello,

I would be also really interested in seeing a replacement of the happiness demo.
Is there any plan to update this example soon or similar example that could be useful ?

Thanks a lot.

Best,

Patrick

···

On Tuesday, November 15, 2016 at 3:54:49 AM UTC, Joshua Barber wrote:

Hello,

The Happiness demo app seems to be a useful example that is relevant to my use case for Bokeh. It currently states it is outdated and refers to Bokeh/bokeh/examples as a source of updated examples.

However in reading through these examples I’m not able to find any similarly comprehensive web app style demos.

Could you please direct me to one (if available)? Or advise me when one similar to Happiness will be available?

Cheers,

Joshua

Hi,

Yes it's definitely on my (very long) list of things to-do, but I can't make any promises about when I will have the opportunity to work on it (there are lots of other, also important and high priority to-dos)

Thanks,

···

On Dec 23, 2016, at 4:16 AM, PH <[email protected]> wrote:

Hello,

I would be also really interested in seeing a replacement of the happiness demo.
Is there any plan to update this example soon or similar example that could be useful ?

Thanks a lot.

Best,

Patrick

On Tuesday, November 15, 2016 at 3:54:49 AM UTC, Joshua Barber wrote:
Hello,

The Happiness demo app seems to be a useful example that is relevant to my use case for Bokeh. It currently states it is outdated and refers to Bokeh/bokeh/examples as a source of updated examples.
However in reading through these examples I'm not able to find any similarly comprehensive web app style demos.

Could you please direct me to one (if available)? Or advise me when one similar to Happiness will be available?

Cheers,
Joshua

--
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/1e3de006-58e2-4522-9cfd-7832c6193f28%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Thank you Bryan – the Happiness demo is very helpful.

For others using the Happiness demo, you may run into a 500 Error in Windows.

Summary:

Running the Happiness demo gives a 500 error due to a Bokeh depreciation exception. To fix the error, comment/remove line 9 in utils.py found in happiness/viz/.

Details:

Running the Happiness demo (originally at https://github.com/bokeh/bokeh-demos/tree/master/happiness) using Conda 4.2.9, Bokeh 0.12.3, Python 2.7.12, and Django 1.8.4 on Window 10 in a conda virtualenv causes a 500 error due to a Bokeh depreciation warning:

Environment:

Request Method: GET
Request URL: http://localhost:8001/3/individual/

Django Version: 1.8.4
Python Version: 2.7.12
Installed Applications:
(‘django.contrib.admin’,
‘django.contrib.auth’,
‘django.contrib.contenttypes’,
‘django.contrib.sessions’,
‘django.contrib.messages’,
‘django.contrib.staticfiles’,
‘happiness’)
Installed Middleware:
(‘django.contrib.sessions.middleware.SessionMiddleware’,
‘django.middleware.common.CommonMiddleware’,
‘django.middleware.csrf.CsrfViewMiddleware’,
‘django.contrib.auth.middleware.AuthenticationMiddleware’,
‘django.contrib.auth.middleware.SessionAuthenticationMiddleware’,
‘django.contrib.messages.middleware.MessageMiddleware’,
‘django.middleware.clickjacking.XFrameOptionsMiddleware’,
‘django.middleware.security.SecurityMiddleware’)

Traceback:
File “C:\Anaconda\envs\happiness\lib\site-packages\django\core\handlers\base.py” in get_response
132. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “C:\Anaconda\envs\happiness\lib\site-packages\django\views\generic\base.py” in view
71. return self.dispatch(request, *args, **kwargs)
File “C:\Anaconda\envs\happiness\lib\site-packages\django\views\generic\base.py” in dispatch
89. return handler(request, *args, **kwargs)
File “C:\Anaconda\envs\happiness\lib\site-packages\django\views\generic\detail.py” in get
116. context = self.get_context_data(object=self.object)
File “D:\repos\local\bokeh-django\happiness\happiness\views.py” in get_context_data
42. plot = make_individual_plot(user=self.object)
File “D:\repos\local\bokeh-django\happiness\happiness\viz\individual.py” in make_individual_plot
5. plot = make_plot()
File “D:\repos\local\bokeh-django\happiness\happiness\viz\utils.py” in make_plot
16. outline_line_color=None,
File “C:\Anaconda\envs\happiness\lib\site-packages\bokeh\plotting\figure.py” in init
48. super(Figure, self).init(*arg, **kw)
File “C:\Anaconda\envs\happiness\lib\site-packages\bokeh\models\plots.py” in init
64. super(LayoutDOM, self).init(**kwargs)
File “C:\Anaconda\envs\happiness\lib\site-packages\bokeh\model.py” in init
86. super(Model, self).init(**kwargs)
File “C:\Anaconda\envs\happiness\lib\site-packages\bokeh\core\properties.py” in init
707. setattr(self, name, value)
File “C:\Anaconda\envs\happiness\lib\site-packages\bokeh\core\properties.py” in setattr
732. super(HasProps, self).setattr(name, value)
File “C:\Anaconda\envs\happiness\lib\site-packages\bokeh\models\plots.py” in responsive
622. “”")
File “C:\Anaconda\envs\happiness\lib\site-packages\bokeh\util\deprecation.py” in deprecated
24. message += " " + extra.trim()

Exception Type: AttributeError at /3/individual/
Exception Value: ‘str’ object has no attribute 'trim

``

However, attempting to downgrade to Bokeh 0.11.1 results in the issue at bokeh=0.11.x conda release packages are broken · Issue #5196 · bokeh/bokeh · GitHub

The fix is to remove/comment the depreciated option in Figure() at line 9 in utils.py located in happiness/viz/:

responsive = True

``

I would have forked the repo and made the change, but this is really more of a dumb mistake than a bug. Maybe a quick update to the readme and/or the environment.yml with the version numbers will help. But downgrading on Windows is still an issue.

···

On Tuesday, December 27, 2016 at 4:16:02 PM UTC-6, Bryan Van de ven wrote:

Hi,

Yes it’s definitely on my (very long) list of things to-do, but I can’t make any promises about when I will have the opportunity to work on it (there are lots of other, also important and high priority to-dos)

Thanks,

On Dec 23, 2016, at 4:16 AM, PH [email protected] wrote:

Hello,

I would be also really interested in seeing a replacement of the happiness demo.
Is there any plan to update this example soon or similar example that could be useful ?

Thanks a lot.

Best,

Patrick

On Tuesday, November 15, 2016 at 3:54:49 AM UTC, Joshua Barber wrote:

Hello,

The Happiness demo app seems to be a useful example that is relevant to my use case for Bokeh. It currently states it is outdated and refers to Bokeh/bokeh/examples as a source of updated examples.

However in reading through these examples I’m not able to find any similarly comprehensive web app style demos.

Could you please direct me to one (if available)? Or advise me when one similar to Happiness will be available?

Cheers,

Joshua


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/1e3de006-58e2-4522-9cfd-7832c6193f28%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

and/or use extra.strip() in deprecation.py ?

Just noticed that the URL to the happiness demo app seems to be broken? (is it gone / moved somewhere else?)

Cheers,

Johnny

···

On Tuesday, 15 November 2016 03:54:49 UTC, Joshua Barber wrote:

Hello,

The Happiness demo app seems to be a useful example that is relevant to my use case for Bokeh. It currently states it is outdated and refers to Bokeh/bokeh/examples as a source of updated examples.

However in reading through these examples I’m not able to find any similarly comprehensive web app style demos.

Could you please direct me to one (if available)? Or advise me when one similar to Happiness will be available?

Cheers,

Joshua

Hi,

In it's previous form it's gone. It suffered bitrot and there's currently core devs with and Django experience (or bandwidth) to recreate it. However, the main idea was using bokeh.client to tweak individual session properties (e.g. based on an authenticated user). There is a super minimal flask example showing how to use bokeh.client to do that (minus any actual user auth bits, how that works is almost always dictated by external factors) in the dev docs:

  https://bokeh.pydata.org/en/dev/docs/user_guide/server.html#connecting-with-bokeh-client

Note that the functionality works in any recent release, but the docs were only updated after the last full release, so that's why they are only in the dev docs at the moment.

Thanks,

Bryan

···

On Jan 24, 2018, at 04:02, [email protected] wrote:

Just noticed that the URL to the happiness demo app seems to be broken? (is it gone / moved somewhere else?)

Cheers,
Johnny

On Tuesday, 15 November 2016 03:54:49 UTC, Joshua Barber wrote:
Hello,

The Happiness demo app seems to be a useful example that is relevant to my use case for Bokeh. It currently states it is outdated and refers to Bokeh/bokeh/examples as a source of updated examples.
However in reading through these examples I'm not able to find any similarly comprehensive web app style demos.

Could you please direct me to one (if available)? Or advise me when one similar to Happiness will be available?

Cheers,
Joshua

--
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/3c960eec-3035-4a46-8401-39953bb6bff7%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.