Skip to content

Course Code Not Present Errors #56

@GatlenCulp

Description

@GatlenCulp

Had gotten some errors for courses in which it seems like there is no course_code

[*] Synchronizing to folder: /Users/gat/mit/6561_crypto/canvas/

Traceback (most recent call last):
  File "/Users/gat/mit/6561_crypto/.venv/bin/canvas", line 10, in <module>
    sys.exit(entry())
             ^^^^^^^
  File "/Users/gat/mit/6561_crypto/.venv/lib/python3.12/site-packages/bin/canvas.py", line 187, in entry
    run_canvas_sync()
  File "/Users/gat/mit/6561_crypto/.venv/lib/python3.12/site-packages/bin/canvas.py", line 132, in run_canvas_sync
    main_menu(settings)
  File "/Users/gat/mit/6561_crypto/.venv/lib/python3.12/site-packages/bin/canvas.py", line 154, in main_menu
    do_sync(settings, "")
  File "/Users/gat/mit/6561_crypto/.venv/lib/python3.12/site-packages/bin/canvas.py", line 170, in do_sync
    synchronizer.sync()
  File "/Users/gat/mit/6561_crypto/.venv/lib/python3.12/site-packages/CanvasSync/entities/synchronizer.py", line 124, in sync
    self.add_courses()
  File "/Users/gat/mit/6561_crypto/.venv/lib/python3.12/site-packages/CanvasSync/entities/synchronizer.py", line 97, in add_courses
    course = Course(course_information,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/gat/mit/6561_crypto/.venv/lib/python3.12/site-packages/CanvasSync/entities/course.py", line 50, in __init__
    course_name = helpers.get_corrected_name(self.course_info[u"course_code"].split(";")[-1])
                                             ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'course_code'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions