It’s a client permission error even though the code was called from the server
code in the server is now
@anvil.server.callable
def num_to_grade(score_row, grade_row):
if score_row >= 90:
if score == 100:
grade_row = "A+"
else:
grade_row = "A"
elif score_row <= 80:
grade_row = "B"
elif score_row <= 70:
grade_row = "C"
else:
grade_row = "F"
whereas the code in the repeating panel is
def text_box_1_change(self, **event_args):
"""This method is called when the text in this text box is edited"""
anvil.server.call_s('num_to_grade', self.item, self.text_box_1.text)
The error obtained is:
anvil.server.InternalError:
Permission denied: Cannot write in table ‘Grades’ from client code.
while setting self.item[‘score’] = self.text_box_1.text
in a data binding for self.text_box_1