I have a table with a column of Date type. In the form I have:
def btnAddToCart_click(self, **event_args):
rightnow = datetime.datetime.now().date()
Cart = anvil.server.call('ViewEditCart')
Cart.add_row(DateCreated=rightnow,Product=self.item,Quantity=1)
In server module ViewEditCart is defined as:
def ViewEditCart():
User = anvil.users.get_user()
if User is not None:
return app_tables.shoppingcartdetails.client_writable(Customer = User)
When Cart.add_row is executed, I get this error:
TypeError: Required argument 'struct_time' must be of type: 'struct_time'
at src/lib/datetime.py, line 253 column 4 called from src/lib/datetime.py,
line 768 column 44
This happened all of the sudden, it worked perfectly before. I believe I didn’t changed any code that would relate to this.