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

I'm getting error while connecting to hugging-face using huggingface-cli login #58

Open
akumarm642 opened this issue Nov 29, 2024 · 2 comments

Comments

@akumarm642
Copy link

huggingface-cli login
`
| | | | ||| ||| ||| | | ||| |||| || ||| |||_|
_| _| _| _| _| _| _| || _| _| _| _| _| | |
||
|
| _| _| _| || _| || _| _| | | | || ||| |||| | |||
_| _| _| _| _| _| _| _| _| _| || _| _| _| _| _| _| |
| | || ||| ||| ||
| _| | ||| | | | ||| ||||

To log in, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens .

Token can be pasted using 'Right-Click'.
Enter your token (input will not be visible):
Add token as git credential? (Y/n)
Traceback (most recent call last):
File "c:\Users\akuma\Downloads\stable-fast-3d-main.venv\Lib\site-packages\huggingface_hub\utils_http.py", line 406, in hf_raise_for_status
response.raise_for_status()
File "c:\Users\akuma\Downloads\stable-fast-3d-main.venv\Lib\site-packages\requests\models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://huggingface.co/api/whoami-v2

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "c:\Users\akuma\Downloads\stable-fast-3d-main.venv\Lib\site-packages\huggingface_hub\hf_api.py", line 1670, in whoami
hf_raise_for_status(r)
File "c:\Users\akuma\Downloads\stable-fast-3d-main.venv\Lib\site-packages\huggingface_hub\utils_http.py", line 460, in hf_raise_for_status
raise _format(BadRequestError, message, response) from e
huggingface_hub.errors.BadRequestError: Bad request:

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\akuma\Downloads\stable-fast-3d-main.venv\Scripts\huggingface-cli.exe_main
.py", line 7, in
File "c:\Users\akuma\Downloads\stable-fast-3d-main.venv\Lib\site-packages\huggingface_hub\commands\huggingface_cli.py", line 57, in main
service.run()
File "c:\Users\akuma\Downloads\stable-fast-3d-main.venv\Lib\site-packages\huggingface_hub\commands\user.py", line 153, in run
login(
File "c:\Users\akuma\Downloads\stable-fast-3d-main.venv\Lib\site-packages\huggingface_hub_login.py", line 123, in login
interpreter_login(new_session=new_session, write_permission=write_permission)
File "c:\Users\akuma\Downloads\stable-fast-3d-main.venv\Lib\site-packages\huggingface_hub_login.py", line 278, in interpreter_login
_login(
File "c:\Users\akuma\Downloads\stable-fast-3d-main.venv\Lib\site-packages\huggingface_hub_login.py", line 397, in _login
token_info = whoami(token)
^^^^^^^^^^^^^
File "c:\Users\akuma\Downloads\stable-fast-3d-main.venv\Lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "c:\Users\akuma\Downloads\stable-fast-3d-main.venv\Lib\site-packages\huggingface_hub\hf_api.py", line 1672, in whoami
raise HTTPError(
requests.exceptions.HTTPError: Invalid user token. If you didn't pass a user token, make sure you are properly logged in by executing huggingface-cli login, and if you did pass a user token, double-check it's correct.`

Things I tried
As i gone through

  1. I checked my token, it is also working
  2. huggingface_hub is also installed
  3. everything is set properly but i don't know where I'm missing

If anyone could help It will be helpful

@ahsen230
Copy link

Following....Did you solve this by any chance?

@ritonV
Copy link

ritonV commented Jan 10, 2025

Same thing... Paste does not work, and even manually it's not possible to enter something

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

3 participants