Closed kmyk closed 4 years ago
$ oj-api login-service --check https://codeforces.com
An exception is thrown at
https://github.com/online-judge-tools/api-client/blob/3d005ac622c160f34b7355e30380e5de2b02a38c/onlinejudge_api/login_service.py#L28
$ oj-api login-service --check https://codeforces.com INFO:root:sleep 1.000000 sec INFO:onlinejudge._implementation.logging:[-] unknown problem: https://codeforces.com INFO:onlinejudge._implementation.logging:[-] unknown contest: https://codeforces.com INFO:onlinejudge._implementation.logging:[x] service recognized: CodeforcesService.from_url('https://codeforces.com/'): https://codeforces.com INFO:onlinejudge._implementation.logging:[x] load cookie from: /home/user/.local/share/online-judge-tools/cookie.jar ERROR:root: Traceback (most recent call last): File "/home/user/.local/lib/python3.6/site-packages/onlinejudge_api/main.py", line 257, in main result = login_service.main(service, username=parsed.username, password=parsed.password, check_only=parsed.check, session=session) File "/home/user/.local/lib/python3.6/site-packages/onlinejudge_api/login_service.py", line 28, in main assert username is None AssertionError {"status": "error", "messages": ["AssertionError"], "result": null}
In Zsh, $USERNAME seems defined unexpectedly... https://qiita.com/quenhulu/items/61edc5dffa711b08d64c
$USERNAME
To reproduce
$ oj-api login-service --check https://codeforces.com
Actual behavior
An exception is thrown at
https://github.com/online-judge-tools/api-client/blob/3d005ac622c160f34b7355e30380e5de2b02a38c/onlinejudge_api/login_service.py#L28
Error log