Pyannote.speaker_diarization giving 401 Client Error

Hi,

I created a user access token with write permissions. Using that token and able to use the model pipeline = Pipeline.from_pretrained(“pyannote/speaker-diarization”, use_auth_token=access_token). But I am getting the following Error.

raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/pyannote/segmentation/resolve/2022.07/pytorch_model.bin

I have been getting a variety of errors when trying to get this model the past ~24 hours. I’m going to keep trying periodically, will report back if things go green.

1 Like

EDIT @artificialintelligen @smarterbizomkar

I was able to fix this by accepting the terms at pyannote/segmentation · Hugging Face


I’m also getting the error in a Google Colab notebook when using a write access token (though a 403 error instead of 401).

HTTPError: 403 Client Error: Forbidden for url: 
https://huggingface.co/pyannote/segmentation/resolve/2022.07/pytorch_model.bin

I tried creating new tokens (both read and write) with no luck. This was working yesterday, for the record.

1 Like

I had the same problem :face_with_monocle:

Traceback (most recent call last):
  File "/home/dg/anaconda3/envs/pyannote/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 213, in hf_raise_for_status
    response.raise_for_status()
  File "/home/dg/anaconda3/envs/pyannote/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://huggingface.co/pyannote/segmentation/resolve/2022.07/pytorch_model.bin

anyone else know how to fix it?

@Zpadger I edited my post to give a fix

this fixed it for me, thanks!

1 Like

I also get an authentification error:

huggingface_hub.utils._errors.RepositoryNotFoundError: 401 Client Error: Repository Not Found for url: https://huggingface.co/pyannote/segmentation/resolve/2022.07/pytorch_model.bin. If the repo is private, make sure you are authenticated.

however i only get it at one computer, even though the code and authentification token are exactly the same
any idea why it works differently on different machines?
thank you

I also get the authentication error, even after accepting the terms at pyannote/segmentation · Hugging Face and providing an access token.

Any ideas on how to fix this?

Even I had the same problem. I followed the below steps to solve the problem.

  1. Update the PyAnnote version to ‘2.1.1’ using ‘pip install --upgrade pyannote.audio’
  2. visit “pyannote/speaker-diarization · Hugging Face” and accept user conditions
  3. visit “pyannote/segmentation · Hugging Face” and accept user conditions
  4. Generate, only ‘READ’ token using your Huggingface account settings–>access Tokens
  5. Login to Huggingface through the command line using the command “huggingface-cli login”. This will ask you the token created in step 4 and then append this token under your ‘.huggingface’ folder.

From now, you may either instantiate the ‘use_auth_token’ option of the pipeline with your token or give only the ‘True’ option.

4 Likes

Thank you. This is what solved my issue. I needed to login with: huggingface-cli login

1 Like

I’ve accepted the terms for all of pyannote’s models and still getting this error. See below.

Hi, By any chance have you fixed this issue?