Clearing selections in Python Callback

I’ve been looking at how to clear selections in python callbacks in 1.0 or newer. In 0.13 I was able to:

def update():

source.selected.indicies =

Now this generates the following error:

2018-11-02 18:39:08,523 error handling message Message ‘PATCH-DOC’ (revision 1) content: {u’references’: , u’events’: [{u’new’: [u’P4’], u’kind’: u’ModelChanged’, u’model’: {u’type’: u’MultiSelect’, u’id’: u’1005’}, u’attr’: u’value’}]}: ValueError(‘Inputs must not be empty.’,)

However, this only generates on an update that is called once there is an active selection. Have others encountered this? I encounter this with 1.0.0 and 1.0.1 but not with 0.13.

Hi,

That's a very strange error, it's actually coming from an update to a MultiSelect widget. I can only guess that some other callback is updating the MultiSelect (badly) based on the source selection. Otherwise it's not really possible to speculate more without code. Can you provide a complete minimal script that reproduces this message?

Thanks,

Bryan

···

On Nov 2, 2018, at 18:45, Thomas Cauley <[email protected]> wrote:

I've been looking at how to clear selections in python callbacks in 1.0 or newer. In 0.13 I was able to:

def update():
     ....
     source.selected.indicies =

Now this generates the following error:

2018-11-02 18:39:08,523 error handling message Message 'PATCH-DOC' (revision 1) content: {u'references': , u'events': [{u'new': [u'P4'], u'kind': u'ModelChanged', u'model': {u'type': u'MultiSelect', u'id': u'1005'}, u'attr': u'value'}]}: ValueError('Inputs must not be empty.',)

However, this only generates on an update that is called once there is an active selection. Have others encountered this? I encounter this with 1.0.0 and 1.0.1 but not with 0.13.

--
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/3a2f219f-b2bb-498a-a1ca-f22c052dfe34%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.