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

AtCoderのテストケースをダウンロードする際、ファイルの末尾1文字が等しい問題が複数あると失敗する #165

Closed
suisen-cp opened this issue Oct 15, 2022 · 1 comment

Comments

@suisen-cp
Copy link

suisen-cp commented Oct 15, 2022

Summary / 概要

標題の通りです

Steps to reproduce / 再現方法

oj download --system https://atcoder.jp/contests/typical90/tasks/typical90_041 --dropbox-token ***

environments:

  • version: online-judge-tools 11.5.1 (+ online-judge-api-client 10.10.1)

Expected behavior / 期待される挙動

正常に 041 のテストケースを取得できること

Actual behavior / 実際の挙動

複数の問題とマッチしたというエラーが出る

Error:  two folders match the problem: {'.tag': 'folder', 'name': '041', ...} and {'.tag': 'folder', 'name': '001', ...}

Cause / 原因

def _match_system_cases_problem_folder(self, *, contest_folder_name: str, problem_folder_name: str) -> bool:
# TODO: improve this function
return self.problem_id[-1] == problem_folder_name.lower()[-1]

において末尾1文字のみで一致判定を行っていることが原因と思われる

Other notes / その他

  • Will you try to create a pull request?
    • no
@suisen-cp
Copy link
Author

すみません、本質的に同じ issue (online-judge-tools/oj#889) が立っていたので閉じます

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

1 participant