-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
Summary / 概要
oj s (submit) command fails with AssertionError: assert parsed_memory_limit when submitting to AtCoder. It seems to fail parsing the memory limit from the problem page HTML.
(翻訳: oj s (提出) コマンドが、AtCoder への提出時に AssertionError: assert parsed_memory_limit で失敗します。問題ページの HTML からメモリ制限を解析するのに失敗しているようです。)
Steps to reproduce / 再現方法
- Download samples from any AtCoder problem (e.g.,
https://atcoder.jp/contests/abc430/tasks/abc430_a) usingoj d.(翻訳:oj dを使って任意のAtCoderの問題(例:https://atcoder.jp/contests/abc430/tasks/abc430_a)のサンプルをダウンロードする。) - Create a solution file (e.g.,
main.py).(翻訳: 解答ファイル(例:main.py)を作成する。) - Run
oj s main.py.(翻訳:oj s main.pyを実行する。)
environments:
oj --version:online-judge-tools 11.5.1 (+ online-judge-api-client 10.10.1)(Latest version)(最新版)- OS: WSL2 (Ubuntu 24.04)
- Python: 3.11.14 (Installed via
mise)(翻訳: mise 経由でインストール)
Expected behavior / 期待される挙動
The oj s command should complete the submission to AtCoder successfully without crashing.
(翻訳: oj s コマンドはクラッシュせず、AtCoder への提出を正常に完了するべきです。)
Actual behavior / 実際の挙動
The command crashes with AssertionError.
(翻訳: コマンドが AssertionError でクラッシュします。)
$ oj s main.py
[INFO] online-judge-tools 11.5.1 (+ online-judge-api-client 10.10.1)
[INFO] read history from: /home/toshi/.cache/online-judge-tools/download-history.jsonl
[INFO] found urls in history:
https://atcoder.jp/contests/abc430/tasks/abc430_a
[INFO] guessed problem: https://atcoder.jp/contests/abc430/tasks/abc430_a
(中略)
[NETWORK] GET: https://atcoder.jp/contests/abc430/tasks/abc430_a
[NETWORK] 200 OK
[ERROR]
Traceback (most recent call last):
File "/home/toshi/.local/share/mise/installs/python/3.11.14/lib/python3.11/site-packages/onlinejudge_command/main.py", line 101, in main
sys.exit(run_program(parsed, parser=parser))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/toshi/.local/share/mise/installs/python/3.11.14/lib/python3.11/site-packages/onlinejudge_command/main.py", line 67, in run_program
if not subcommand_submit.run(args):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/toshi/.local/share/mise/installs/python/3.11.14/lib/python3.11/site-packages/onlinejudge_command/subcommand/submit.py", line 100, in run
language_dict: Dict[LanguageId, str] = {language.id: language.name for language in problem.get_available_languages(session=sess)}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/toshi/.local/share/mise/installs/python/3.11.14/lib/python3.11/site-packages/onlinejudge/service/atcoder.py", line 1008, in get_available_languages
data = self.download_data(session=session)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/toshi/.local/share/mise/installs/python/3.11.14/lib/python3.11/site-packages/onlinejudge/service/atcoder.py", line 811, in download_data
return AtCoderProblemDetailedData.from_html(html, problem=self, session=session, response=resp, timestamp=timestamp)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/toshi/.local/share/mise/installs/python/3.11.14/lib/python3.11/site-packages/onlinejudge/service/atcoder.py", line 770, in from_html
data = AtCoderProblemData._from_html(html, problem=problem, session=session, response=response, timestamp=timestamp)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/toshi/.local/share/mise/installs/python/3.11.14/lib/python3.11/site-packages/onlinejudge/service/atcoder.py", line 582, in _from_html
assert parsed_memory_limit
^^^^^^^^^^^^^^^^^^^
AssertionErrorOther notes / その他
- Will you try to create a pull request?
- yes
IWM-S, kanra824, rotarymars and tsuzuki-takaaki
Metadata
Metadata
Assignees
Labels
No labels