Login autonlp behind a proxy server

Hello,

My account is enabled for AutoNLP.
I’m following the page to install autonlp on a Windows 10, Python version 3.8.5.

I tried the autonlp login via a terminal.

Command :
autonlp login --api-key MY_HUGGING_FACE_API_TOKEN

Results:


Traceback (most recent call last):
File “c:\users<my-username>\dev\huggingface\venv\lib\site-packages\autonlp\utils.py”, line 41, in http_get
response = requests.get(
File “c:\users<my-username>\dev\huggingface\venv\lib\site-packages\requests\api.py”, line 76, in get
return request(‘get’, url, params=params, **kwargs)
File “c:\users<my-username>\dev\huggingface\venv\lib\site-packages\requests\api.py”, line 61, in request
return session.request(method=method, url=url, **kwargs)
File “c:\users<my-username>\dev\huggingface\venv\lib\site-packages\requests\sessions.py”, line 542, in request
resp = self.send(prep, **send_kwargs)
File “c:\users<my-username>\dev\huggingface\venv\lib\site-packages\requests\sessions.py”, line 655, in send
r = adapter.send(request, **kwargs)
File “c:\users<my-username>\dev\huggingface\venv\lib\site-packages\requests\adapters.py”, line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host=‘huggingface.co’, port=443): Max retries exceeded with url: /api/whoami-v2 (Caused by SSLError(SSLCertVerificationError(1, ‘SSL: CERTIFICATE_VERIFY_FAILED certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)’)))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users<my-username>\AppData\Local\Programs\Python\Python38\lib\runpy.py”, line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File “C:\Users<my-username>\AppData\Local\Programs\Python\Python38\lib\runpy.py”, line 87, in run_code
exec(code, run_globals)
File "C:\Users<my-username>\Dev\huggingface\venv\Scripts\autonlp.exe_main
.py", line 7, in
File “c:\users<my-username>\dev\huggingface\venv\lib\site-packages\autonlp\cli\autonlp.py”, line 52, in main
command.run()
File “c:\users<my-username>\dev\huggingface\venv\lib\site-packages\autonlp\cli\login.py”, line 31, in run
client.login(token=self._api_key)
File “c:\users<my-username>\dev\huggingface\venv\lib\site-packages\autonlp\autonlp.py”, line 41, in login
auth_resp = http_get(path="/whoami-v2", domain=config.HF_API, token=token, token_prefix=“Bearer”)
File “c:\users<my-username>\dev\huggingface\venv\lib\site-packages\autonlp\utils.py”, line 45, in http_get
raise UnreachableAPIError(“:x: Failed to reach AutoNLP API, check your internet connection”)
autonlp.utils.UnreachableAPIError: :x: Failed to reach AutoNLP API, check your internet connection


Could you please tell me how to specify a proxy in the login command ?

Many thanks for your help on this,

++

We would look into this issue. Since its a feature request, would you mind creating an issue in the Github repo: GitHub - huggingface/autonlp: 🤗 AutoNLP: train state-of-the-art natural language processing models and deploy them in a scalable environment automatically

1 Like

Hello @abhishek

This issue is logged and solved :slight_smile:
Issue #63

1 Like

How did you solved this issue? I have the same one=((

1 Like

hello, how did you solve it?

Please visit this GitHub page for the solution: Login autonlp behind a proxy server · Issue #63 · huggingface/autonlp · GitHub