Skip to content

Conversation

@HugovanSchalm
Copy link

@HugovanSchalm HugovanSchalm commented Jun 23, 2025

Addresses #40.

I also encountered this error when syncing:

Traceback (most recent call last):
  File "/home/hugo/.local/bin/canvas", line 8, in <module>
    sys.exit(entry())
             ~~~~~^^
  File "/home/hugo/.local/share/pipx/venvs/canvassync/lib/python3.13/site-packages/bin/canvas.py", line 186, in entry
    run_canvas_sync()
    ~~~~~~~~~~~~~~~^^
  File "/home/hugo/.local/share/pipx/venvs/canvassync/lib/python3.13/site-packages/bin/canvas.py", line 132, in run_canvas_sync
    main_menu(settings)
    ~~~~~~~~~^^^^^^^^^^
  File "/home/hugo/.local/share/pipx/venvs/canvassync/lib/python3.13/site-packages/bin/canvas.py", line 154, in main_menu
    do_sync(settings, "")
    ~~~~~~~^^^^^^^^^^^^^^
  File "/home/hugo/.local/share/pipx/venvs/canvassync/lib/python3.13/site-packages/bin/canvas.py", line 170, in do_sync
    synchronizer.sync()
    ~~~~~~~~~~~~~~~~~^^
  File "/home/hugo/.local/share/pipx/venvs/canvassync/lib/python3.13/site-packages/CanvasSync/entities/synchronizer.py", line 128, in sync
    course.sync()
    ~~~~~~~~~~~^^
  File "/home/hugo/.local/share/pipx/venvs/canvassync/lib/python3.13/site-packages/CanvasSync/entities/course.py", line 160, in sync
    self.add_files_folder()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/hugo/.local/share/pipx/venvs/canvassync/lib/python3.13/site-packages/CanvasSync/entities/course.py", line 116, in add_files_folder
    main_folder[u"name"] = u"Other Files"
    ~~~~~~~~~~~^^^^^^^^^
TypeError: 'NoneType' object does not support item assignment

I think one of my courses has a weird file structure and thus has no course files folder. This check fixes it and allows that course to successfully sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant