Tabulator multiple value error on row click

When clicking a row, I get this error :

TypeError: raise_event() got multiple values for argument 'event' at app/tabulator/Tabulator/__init__.py:171

The event handler is this :

def tabulator_list_row_click(self, row, **event_args):
    print("This never prints")

I can populate the table fine, and there’s only one “id” field.

I have tried with several versions of Tabulator as an external dependency (v2 & v3).

Any ideas?

Best to raise at the tabulator GitHub issues page.

Does it happen in a minimal reproduction app?

It doesn’t happen on the published example app.

No, it doesn’t. So it’s probably something I’m doing, but I don’t know how to even debug this.

I’ll move this to github…

1 Like

One thing I can think of - if you’ve monkey patched raise_event (or using a dependency that monkey patches raise_event)

And it’s defined like

def raise_event(event, **event_args):
    ...

then you would get the error you’re describing

Nah, no monkey patching at all. The only other dependency I have is Anvil Extras.

BUT - I do have something odd. Note the TWO Tabulator entries :

image

I’m checking to see if that has something to do with it. Not sure where the second one comes from …

OK, I removed what must have been an experiment in creating a wrapper around Tabulator to configure it how I need it across all forms, and I also removed the main Tabulator dependency. I then re-added the external Tabulator dependency using the ID you publish, and the problem remains.

Next, I created a new form, put a new tabulator control on it, added some data and the row click event, and the problem happened again.

So it’s happening on new forms as well as old.

How can I check for something overriding the event handling (as I assume you alluded to in your reply)?

i think it’s time to create a minimal example clone link :smile:

Agreed, I’ll cut out what I can.

interesting - if I make the form the startup form, all is well. So I’m obviously messing it up somewhere …

1 Like

Ok - i think this is from the anvil_extras augment library.
We’ll ship a fix there

edit: that should be fixed in anvil-extras v2.7.0

1 Like

Perfect!

Thank you for that. Thought I was going mad …

1 Like