Skip to content

Assertion Error when there are multiple courses with the same Chinese name #17

@domen111

Description

@domen111

It is possible to take multiple courses with the same name, such as "專題研究", in one semester at NTU. However, this situation causes the following AsssertionError:

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 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 837, in fetch
    assert sn == courses[name]['sn']
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