Hello! I am working on something right now and I have this code:
def button_add_click(self, **event_args):
“”“This method is called when the button is clicked”""
name = self.text_box_item.text
anvil.server.call(‘add_item’, name=name)
open_form(‘HomeForm’)
return
that is lines 60-65
I am getting this error:
TypeError: add_item() got an unexpected keyword argument ‘name’ at [HomeForm, line 63](javascript:void(0))
Any help on how to fix this?? Thanks
Hi there,
It sounds like the server call doesn’t have name
as a keyword argument.
For example, take this function:
def test(a):
pass
If you call this with an unexpected keyword argument, you’ll get the error you got:
test(b=1)
"TypeError: test() got an unexpected keyword argument 'b'"
Can you show the add_item
function and we can help to solve the problem?