Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

urllib.error.HTTPError: HTTP Error 401: Unauthorized #7

Closed
soundaraj opened this issue Jul 22, 2020 · 1 comment
Closed

urllib.error.HTTPError: HTTP Error 401: Unauthorized #7

soundaraj opened this issue Jul 22, 2020 · 1 comment

Comments

@soundaraj
Copy link

in windows 10 , i tried this coderunner but i gives 401 error

`

result = coderunner.code("print('hello')","Python3",path=False)
result.run()
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\SOUNDA1\Desktop\PYTHON1\ENV1\lib\site-packages\coderunner\coderunner.py", line 227, in run
token = self.__submit()
File "C:\Users\SOUNDA
1\Desktop\PYTHON1\ENV1\lib\site-packages\coderunner\coderunner.py", line 165, in __submit
with urllib.request.urlopen(req) as response:
File "c:\users\soundara rajan\appdata\local\programs\python\python37\Lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "c:\users\soundara rajan\appdata\local\programs\python\python37\Lib\urllib\request.py", line 531, in open
response = meth(req, response)
File "c:\users\soundara rajan\appdata\local\programs\python\python37\Lib\urllib\request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
File "c:\users\soundara rajan\appdata\local\programs\python\python37\Lib\urllib\request.py", line 569, in error
return self._call_chain(*args)
File "c:\users\soundara rajan\appdata\local\programs\python\python37\Lib\urllib\request.py", line 503, in _call_chain
result = func(*args)
File "c:\users\soundara rajan\appdata\local\programs\python\python37\Lib\urllib\request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized
`

@Bhupesh-V
Copy link
Collaborator

Hi @soundaraj 👋 , thanks for reporting this.
The issue arises due to the fact the Judge0 is now freemium, the default API URL, [https://api.judge0.com] is no longer available. To use the API through CodeRunner # for a free (or paid) plan on RapidAPI & get your token

The PR #6 is a fix for this. It will be merge and released in 2-3 days

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants