It’s a client permission error even though the code was called from the server
code for grade calculator 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
Facing same issue again and again.
stucork
December 11, 2021, 12:55am
2
Hi @whothefaq1 and welcome to the forum. I’ve moved this to a new topic. You’ll probably need to provide more info about your issue in order for others to help.
Here’s a guide on how to ask a good question .