On Sunday, 30 August 2015 00:14:03 UTC+1, Pythonic wrote:
I just upgraded to 0.9.3, I am trying to set the code for a callback as shown below, I get this error:
AttributeError: unexpected attribute 'code' to Callback, possible attributes are name, session or tags
Most people are probably doing "from bokeh.models import Callback" so they are getting the new base class Callback model that does not take any properties (and so is complaining), instead of getting the deprecation function.
All, apologies for the inconvenience form the inadvertently abrupt API change. To summarize, you should now do:
from bokeh.models import CustomJS
and use "CustomJS" anywhere you previously used "Callback".
Bryan
···
On Aug 30, 2015, at 1:01 AM, James Bednar <[email protected]> wrote:
Aron A. and I found that it just broke, with no deprecation, but he thought that it was not something documented from 0.9.2 and thus not needing it. Apparently not!
Jim
On Sat, Aug 29, 2015 at 6:46 PM, Bryan Van de Ven <[email protected]> wrote:
Well, I think the intent was for a working, smooth deprecation, so it should have worked and printed a warning.
> On Aug 30, 2015, at 12:15 AM, Pythonic <[email protected]> wrote:
>
> Ok ok, I should have read the release first...
>
>
>
> On Sunday, 30 August 2015 00:14:03 UTC+1, Pythonic wrote:
> I just upgraded to 0.9.3, I am trying to set the code for a callback as shown below, I get this error:
>
>
> AttributeError: unexpected attribute 'code' to Callback, possible attributes are name, session or tags
>
> code = """
> console.log('Hello')
> """
>
> source.callback = Callback(args={'slider':slider}, code=code)
>
>
>
>
>
> --
> 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/4f660cea-10f1-40da-8c2c-3a21decf446f%40continuum.io\.
> For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
Most people are probably doing “from bokeh.models import Callback” so they are getting the new base class Callback model that does not take any properties (and so is complaining), instead of getting the deprecation function.
All, apologies for the inconvenience form the inadvertently abrupt API change. To summarize, you should now do:
from bokeh.models import CustomJS
and use “CustomJS” anywhere you previously used “Callback”.
Aron A. and I found that it just broke, with no deprecation, but he thought that it was not something documented from 0.9.2 and thus not needing it. Apparently not!
Jim
On Sat, Aug 29, 2015 at 6:46 PM, Bryan Van de Ven [email protected] wrote:
Well, I think the intent was for a working, smooth deprecation, so it should have worked and printed a warning.