I am getting this error
SyntaxError: keyword can't be an expression
at TaskAssignment, line 15called from AssignTaskForm, line 7called from Admin_tasks, line 8called from Admin_Dashboard, line 41
for the follwing code:
class Task_assign:
def init(self, Assignee, title, description, due_date):
self.assignee = assignee
self.title = title
self.description = description
self.due_date = due_date
def assign(self):
user_row = app_tables.users.get(username=self.assignee)
new_task = app_tables.tasks.add_row(
‘Task Name’ = self.title,
‘Description’ = self.description,
‘Due Date’ = self.due_date,
‘Status’ = ‘Not Started’,
‘Assignee’ = self.assignee
)
anvil.server.call_s(
‘send_task_email’,
Assignee = self.assignee,
Task Name = self.title,
Due Date = self.due_date
)
Can anyone tell me how do i overcome this error.
I believe the error is happening in the add_row() or call_s() function when I’m passing keyword arguments, but I’m not sure what I’m doing wrong.
Can someone help me understand what’s causing the error and how to fix it?
Thanks in advance!