All of a sudden my app started experiencing this error when loading a particular component. I am leveraging the Tabulator component, which I have not modified since last October.
The full error is:
TypeError: Component constructor takes keyword arguments only
at app/Tabulator/Tabulator/__init__.py, line 174 column 8
called from app/Tabulator/Tabulator/__init__.py, line 178 column 8
called from Main, line 54
Code Sample:
self.content_panel.add_component(Donations())
I am not really sure how to debug, as I don’t have access to the __init__ method of that component.
Hi, have you tried updating the Tabulator component? I have done some updates of tabulator since then that coincide with updates to anvil.
Could you post a clone link of your app. Including the Tabulator dependency you’re using. If you can post the clone link with its dependencies as explained here:
Here’s a link to updating another dependency. Replace the dependency name with Tabulator and it should work.
Ok so in replacing all my usage of the old dependency with the new one, looks like my problems are now all fixed. Not sure what happened to break my old version.
great - glad it’s fixed. The bug is a little tricky to explain - but essentially when we improved our anvil.js library it meant that anything that was callable in python became callable in javascript.
And there’s a line in the Tabulator source code that calls a function if it gets a function as a formatter. So it was trying to call an anvil Link from javascript where before it would ignore it.
The update to the Tabulator library fixed that bug.
Great. Well thanks for staying on top of this stuff. Your libraries are awesome by the way. I am actually in the middle of using the Popover dependency and I am turning the popovers into a single and multiselect component with a search. It’s going pretty well so far!
I am not as skilled at the javascript stuff, so my code is hacky in places, but it works relatively well. The multiselect is a combination of the token box implementation plus the popovers. I had to modify the popovers code in a couple of places to help with some of the resizing and show/hide functions.
Hey so I am having more problems than it’s worth trying to turn popovers into a multiselect. Do you have any advice for implementing that library you linked? Where do I start? Are there resources you used to learn how to translate the popover functions into anvil code?