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

the score of problem may be surrounded by \( \) #411

Closed
kmyk opened this issue Apr 7, 2019 · 1 comment · Fixed by #420
Closed

the score of problem may be surrounded by \( \) #411

kmyk opened this issue Apr 7, 2019 · 1 comment · Fixed by #420

Comments

@kmyk
Copy link
Member

kmyk commented Apr 7, 2019

落ち

https://atcoder.jp/contests/wupc2019/tasks/wupc2019_a

@kmyk
Copy link
Member Author

kmyk commented Apr 22, 2019

<p>配点 : \(100\) 点</p> などと \( \) で囲まれてるのが原因。同様のものはこのコンテストだけ

$ oj dl -n https://atcoder.jp/contests/wupc2019/tasks/wupc2019_a
[x] problem recognized: AtCoderProblem.from_url('https://atcoder.jp/contests/wupc2019/tasks/wupc2019_a'): https://atcoder.jp/contests/wupc2019/tasks/wupc2019_a
[x] load cookie from: /home/user/.local/share/online-judge-tools/cookie.jar
[x] GET: https://atcoder.jp/contests/wupc2019/tasks/wupc2019_a
[x] 200 OK
Traceback (most recent call last):
  File "/home/user/.local/bin/oj", line 7, in <module>
    onlinejudge._implementation.main.main(args=sys.argv[1:])
  File "/home/user/.local/lib/python3.6/site-packages/onlinejudge/_implementation/main.py", line 279, in main
    run_program(namespace, parser=parser)
  File "/home/user/.local/lib/python3.6/site-packages/onlinejudge/_implementation/main.py", line 252, in run_program
    download(args)
  File "/home/user/.local/lib/python3.6/site-packages/onlinejudge/_implementation/command/download.py", line 52, in download
    samples = problem.download_sample_cases(session=sess)  # type: ignore
  File "/home/user/.local/lib/python3.6/site-packages/onlinejudge/service/atcoder.py", line 550, in download_sample_cases
    return self.download_content(session=session).sample_cases
  File "/home/user/.local/lib/python3.6/site-packages/onlinejudge/service/atcoder.py", line 543, in download_content
    self._cached_content = _AtCoderProblemContent_from_html(resp.content.decode(resp.encoding), problem=self)
  File "/home/user/.local/lib/python3.6/site-packages/onlinejudge/service/atcoder.py", line 507, in _AtCoderProblemContent_from_html
    score = _AtCoderProblemContent_parse_score(soup)
  File "/home/user/.local/lib/python3.6/site-packages/onlinejudge/service/atcoder.py", line 490, in _AtCoderProblemContent_parse_score
    return int(utils.remove_suffix(utils.remove_prefix(p.text, '配点 : '), ' 点'))
ValueError: invalid literal for int() with base 10: '\\(100\\)'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant