Describe the bug
When requesting grades, if the grade is not one of the three types in the code (eg. is not 1-5, points or percentages but for example text), max_points and possibly something else will be undefined.
Your code
allgrades = edupage.get_grades()
Error message
Traceback (most recent call last):
File "/home/toba/Code/edupage-api-test/main.py", line 28, in <module>
getGrades()
File "/home/toba/Code/edupage-api-test/main.py", line 23, in getGrades
allgrades = edupage.get_grades()
^^^^^^^^^^^^^^^^^^^^
File "/home/toba/.local/lib/python3.11/site-packages/edupage_api/__init__.py", line 158, in get_grades
return Grades(self).get_grades(year=None, term=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/toba/.local/lib/python3.11/site-packages/edupage_api/module.py", line 95, in __impl
return method(self, *method_args, **method_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/toba/.local/lib/python3.11/site-packages/edupage_api/grades.py", line 148, in get_grades
subject_name, teacher, max_points, importance, verbal, percent)
^^^^^^^^^^
UnboundLocalError: cannot access local variable 'max_points' where it is not associated with a value
Expected behavior
A clear and concise description of what you expected to happen.
Describe the bug When requesting grades, if the grade is not one of the three types in the code (eg. is not 1-5, points or percentages but for example text), max_points and possibly something else will be undefined.
Your code
Error message
Expected behavior A clear and concise description of what you expected to happen.
Version