Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
domen111 opened this issue May 18, 2021 · 1 comment

Comments

@domen111
Copy link

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
@lantw44
Copy link
Owner

lantw44 commented Jan 31, 2022

這個感覺有點麻煩,因為目前是用課程名稱當資料夾名稱,所以課程名稱不能重複。如果要解決問題,可能只能按照課程出現順序在課程名稱後面加 1、2、3 之類的編號,因為這些課程不一定有 CEIBA 課程代號。你有打算提供 patch 修正這個問題嗎?

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

No branches or pull requests

2 participants