jameshwc/Ceiba-Downloader

Unable to list and download the courses with a TA account

Opened this issue · 2 comments

With version v2.2.2, the following message is shown right after logging in with my TA account:
2022-12-28 16:21:04 - DEBUG - Starting new HTTPS connection (1): ceiba.ntu.edu.tw:443
2022-12-28 16:21:04 - DEBUG - https://ceiba.ntu.edu.tw:443 "POST /index.php?error_check=OK HTTP/1.1" 302 0
2022-12-28 16:21:04 - DEBUG - https://ceiba.ntu.edu.tw:443 "GET /ta/ HTTP/1.1" 200 None
2022-12-28 16:21:04 - DEBUG - https://ceiba.ntu.edu.tw:443 "GET /ta/?op=personal HTTP/1.1" 200 None
2022-12-28 16:21:04 - INFO - 登入 Ceiba 成功!
2022-12-28 16:21:04 - INFO - 正在取得課程...
2022-12-28 16:21:04 - DEBUG - https://ceiba.ntu.edu.tw:443 "GET /ta/index.php?seme_op=all HTTP/1.1" 200 None
2022-12-28 16:21:04 - ERROR - local variable 'course_sn' referenced before assignment
image

The courses are accessible by logging in with the official ceiba site:
image
image

They were not shown in the "全部" list, however, which might be the cause:
image

Is there anything I could do instead of downloading the course one by one, considering this may be a common issue?
Edit: It works perfectly with both of my student accounts, by the way.

Sorry for the late reply.

It looks like a bug in ceiba itself, and unfortunately I cannot think of an easy workaround right now.

I've raised the issue to the ceiba maintenance team and let's see if they have clues about it. Otherwise I might take some time to create a special version of this downloader to handle your case.

(this is a rare case though, you're the first one to bring about this issue considering it has been used by thousands of people)

It might be related to the TA account with my first guess, which may explain why most people didn't report or encounter this issue. Thanks anyway for looking into it.