Skip to content

Assertion Error when a grade is not announced #18

@domen111

Description

@domen111

One of the courses I took still shows a grade as "未公佈". This causes the following AssertionError:

Traceback (most recent call last):
  File "/tmp2/b05902094/ceiba-dl/ceiba-dl.py", line 243, in <module>
    exit(0 if args.func(args, config) else 1)
  File "/tmp2/b05902094/ceiba-dl/ceiba-dl.py", line 139, in run_get
    succeeded = succeeded and get.run(path, retry=args.retry,
  File "/tmp2/b05902094/ceiba-dl/ceiba_dl/__init__.py", line 387, in run
    return self.download_file(path, retry + 1,
  File "/tmp2/b05902094/ceiba-dl/ceiba_dl/__init__.py", line 232, in download_file
    if not self.download_file(child_path, retry, dcb, ecb):
  File "/tmp2/b05902094/ceiba-dl/ceiba_dl/__init__.py", line 232, in download_file
    if not self.download_file(child_path, retry, dcb, ecb):
  File "/tmp2/b05902094/ceiba-dl/ceiba_dl/__init__.py", line 232, in download_file
    if not self.download_file(child_path, retry, dcb, ecb):
  [Previous line repeated 1 more time]
  File "/tmp2/b05902094/ceiba-dl/ceiba_dl/__init__.py", line 214, in download_file
    node = self.vfs.open(path)
  File "/tmp2/b05902094/ceiba-dl/ceiba_dl/vfs.py", line 40, in open
    work.fetch()
  File "/tmp2/b05902094/ceiba-dl/ceiba_dl/vfs.py", line 2118, in fetch
    assert grade['grade'] == grade_row_grade
AssertionError

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