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

'403 Client Error' while submitting to codeforces #118

Closed
R1B3n-13 opened this issue Nov 23, 2020 · 1 comment
Closed

'403 Client Error' while submitting to codeforces #118

R1B3n-13 opened this issue Nov 23, 2020 · 1 comment
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@R1B3n-13
Copy link

R1B3n-13 commented Nov 23, 2020

Description

while submitting to codeforces I'm receiving 403 Client Error message.

Error log

$ oj s https://codeforces.com/contest/1451/problem/A E:\CP\CF\A\A.cpp --wait=0 --yes --no-open -l 54
[INFO] online-judge-tools 11.1.1 (+ online-judge-api-client 10.5.0)
[WARNING] cannot guess URL since the given file is not in the current directory
[INFO] problem recognized: CodeforcesProblem.from_url('https://codeforces.com/contest/1451/problem/A'): https://codeforces.com/contest/1451/problem/A
[INFO] code (1865 byte):

** MY SOLUTION **

[INFO] load cookie from: C:\Users\nebir\AppData\Local\online-judge-tools\online-judge-tools\cookie.jar
[NETWORK] GET: https://codeforces.com/enter
[NETWORK] 302 Found
[INFO] You are logged in.
[NETWORK] GET: https://codeforces.com/contest/1451/problem/A
[NETWORK] 200 OK
[INFO] chosen language: 54 (GNU G++17 7.3.0)
[WARNING] the problem "https://codeforces.com/contest/1451/problem/A" is specified to submit, but no samples were downloaded in this directory. this may be mis-operation
[NETWORK] GET: https://codeforces.com/contest/1451/problem/A
[NETWORK] 200 OK
[NETWORK] POST: https://codeforces.com/contest/1451/problem/A
[NETWORK] 403 Forbidden
[ERROR] 403 Client Error:  for url: https://codeforces.com/contest/1451/problem/A
Traceback (most recent call last):
  File "C:\Users\nebir\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\onlinejudge\service\codeforces.py", line 389, in submit_code
    resp.raise_for_status()
  File "C:\Users\nebir\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\requests\models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error:  for url: https://codeforces.com/contest/1451/problem/A
[WARNING] You may use wrong User-Agent: 'online-judge-tools/11.1.1 (+https://github.com/online-judge-tools/oj)'
[FAILURE] submission failed

Environment

Windows 10 Pro
Build: 19042.630.

$ python --version
Python 3.8.6
$ oj --version
online-judge-tools 11.1.1 (+ online-judge-api-client 10.5.0)
@R1B3n-13 R1B3n-13 reopened this Nov 23, 2020
@kmyk kmyk added bug Something isn't working duplicate This issue or pull request already exists labels Nov 25, 2020
@kmyk
Copy link
Member

kmyk commented Nov 25, 2020

As you may have notice, this issue seems the same to #117.
But thank you for reporting. This is a good bug-report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants