You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When listing assignments for a course, I get an error
for assignment in connection.account.get_assignments(chosen_course_id):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/mdjzvx1shsldb4iy135shqqp1f1zbk5l-python3-3.12.8-env/lib/python3.12/site-packages/gradescopeapi/classes/account.py", line 144, in get_assignments
assignment_info_list = get_assignments_instructor_view(coursepage_soup)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/mdjzvx1shsldb4iy135shqqp1f1zbk5l-python3-3.12.8-env/lib/python3.12/site-packages/gradescopeapi/classes/_helpers/_assignment_helpers.py", line 46, in get_assignments_instructor_view
assignment_id=assignment["url"].split("/")[-1],
~~~~~~~~~~^^^^^^^
KeyError: 'url'
To Reproduce
Steps to reproduce the behavior:
connection = GSConnection()
username = os.environ.get("GRADESCOPE_USER")
password = os.environ.get("GRADESCOPE_PASS")
connection.login(username, password)
courses = connection.account.get_courses()
for course_id, course in courses["instructor"].items():
print(course_id, course)
chosen_course_id = id_goes_here
for assignment in connection.account.get_assignments(chosen_course_id):
print(assignment_id, assignment)
Expected behavior
Assignments are listed without trouble
Desktop (please complete the following information):
OS: NixOS
Additional context
I added a print statement to debug this a bit and the problematic entry looks like this
Describe the bug
When listing assignments for a course, I get an error
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Assignments are listed without trouble
Desktop (please complete the following information):
Additional context
I added a print statement to debug this a bit and the problematic entry looks like this
The text was updated successfully, but these errors were encountered: