Closed ryan-caesar-ramos closed 1 year ago
Probably same issue as https://github.com/huggingface/huggingface_hub/issues/1311
hi all, the issue is fixed on our hub backend. Please try your uploads again. Thanks
related
HfHubHTTPError: 403 Client Error: Forbidden for url:
Forbidden: pass create_pr=1
as a query parameter to create a Pull Request
@stevenbowler not sure the issue is related. The issue above has the error HfHubHTTPError: 403 Client Error: Forbidden for url: https://s3.us-east-1.amazonaws.com/lfs.huggingface.co/repos/.......
which is very different from your "403 forbidden please use create_pr=1". Could you open a new issue and had more details to it (packages version, script, stacktrace,...).
EDIT: one possibility for "Forbidden: pass create_pr=1 as a query parameter to create a Pull Request" is that you've tried to commit to a repo for which you don't have the permission. Please check you have access to the repo, generate a WRITE access token in your settings and run huggingfacecli login
before re-running your script.
still running into this
requests.exceptions.SSLError: (MaxRetryError("HTTPSConnectionPool(host='s3.us-east-1.amazonaws.com', port=443):
Max retries exceeded with url:
/lfs.huggingface.co/repos/be/ca/beca37002c5ac438409f93a19754e9f437f7ae2790d04373d0878d62c59bb311/8a79d873c505e259676694c3777558dda094e043cec78cc0c9dec74e69256885?
X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4N7VTDGO27GPWFUO%2F20231018%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231018T142219Z&
X-Amz-Expires=86400&X-Amz-Signature=9990066d6d540bf5c230e4f259ca1c5e2336fbab53b81134a184455231e67ffb&X-Amz-SignedHeaders=host&partNumber=14&uploadId=pYuuv5cYTQxanvY_ZOdNBncUfiyVKLleaKHdfsC.fbKy9.fZj9KEdx373OzvbtBoERLdfDxG2P7VH.hpENb6kptfKkbn1KGDBPCQy3nyczadluCmYt68dWmpPHD99Y4x&x-id=UploadPart
(Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2426)')))”),
'(Request ID: c5cef6be-aa87-46ff-9cde-0a567ae513df)’)
with huggingface_hub v ’0.16.4’
not blocking any real dev work as i was just running https://github.com/huggingface/diffusers/tree/main/examples/controlnet
but wanted to raise it since this is closed
@MDCurrent The error you are reporting seems to be different. It looks like a transient ConnectionError while upload a file to the Hub right? Doesn't happen very often but if you encounter it again, would you mind opening a new issue and copy-paste the full stack-trace? It might help investigate further. Thanks in advance!
(also purely FYI, latest version is now 0.18.0
if you wanna update :rocket: :wink: )
Same issue here. I got the same error Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2426)')))
while uploading files to Huggingface Repo.
I am using WSL on Windows 11. I have tried all the following things but all failed with the same error:
However, this issue seems to tie to a specific network. When I connected my Wifi to a different network, this error seems to disappear. That potentially problematic network has been working great and there is no firewall.
Same issue here. I got the same error
Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2426)')))
while uploading files to Huggingface Repo.I am using WSL on Windows 11. I have tried all the following things but all failed with the same error:
- Use the web UI through Brave browser.
- Use Huggingface API in Python.
- Use git lfs to upload.
However, this issue seems to tie to a specific network. When I connected my Wifi to a different network, this error seems to disappear. That potentially problematic network has been working great and there is no firewall.
Sorry you're facing this issue @alexbrowngh. Would you mind opening a new issue for it? And paste the full stacktrace to check when it happens? Also updating huggingface_hub
to latest release (0.20.1) before trying and trying to use a minimal script that uploads a simple file. If you can reproduce the error in such a scenario, we might be able to investigate what wrong.
Same issue here. I got the same error
Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2426)')))
while uploading files to Huggingface Repo. I am using WSL on Windows 11. I have tried all the following things but all failed with the same error:
- Use the web UI through Brave browser.
- Use Huggingface API in Python.
- Use git lfs to upload.
However, this issue seems to tie to a specific network. When I connected my Wifi to a different network, this error seems to disappear. That potentially problematic network has been working great and there is no firewall.
Sorry you're facing this issue @alexbrowngh. Would you mind opening a new issue for it? And paste the full stacktrace to check when it happens? Also updating
huggingface_hub
to latest release (0.20.1) before trying and trying to use a minimal script that uploads a simple file. If you can reproduce the error in such a scenario, we might be able to investigate what wrong.同样的问题。我在上传文件到Huggingface Repo时遇到了同样的错误
Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2426)')))
。 我在Windows 11上使用WSL。我尝试了以下所有方法,但都失败了,并出现相同的错误:
- 通过Brave浏览器使用Web UI。
- 在Python中使用Huggingface API。
- 使用git lfs上传。
然而,这个问题似乎与一个特定的网络有关。当我将Wifi连接到不同的网络时,这个错误似乎消失了。这个潜在的问题网络一直工作得很好,没有防火墙。
很抱歉你面临这个问题@alexbrowngh。你介意为它开一期新杂志吗?然后粘贴完整的堆栈跟踪来检查它何时发生?在尝试使用上传简单文件的最小脚本之前,还将
huggingface_hub
更新到最新版本(0.20.1)。如果你能在这种情况下重现错误,我们也许就能调查出问题所在。
I need your help! ,I am sure:(1)token is write,(2)network is well.but run in WSL‘s Ubuntu has error: HTTPError Traceback (most recent call last) File ~/anaconda3/envs/torch_base/lib/python3.9/site-packages/huggingface_hub/utils/_errors.py:304, in hf_raise_for_status(response, endpoint_name) 303 try: --> 304 response.raise_for_status() 305 except HTTPError as e:
File ~/anaconda3/envs/torch_base/lib/python3.9/site-packages/requests/models.py:1021, in Response.raise_for_status(self) 1020 if http_error_msg: -> 1021 raise HTTPError(http_error_msg, response=self)
HTTPError: 403 Client Error: Forbidden for url: https://huggingface.co/api/repos/create
The above exception was the direct cause of the following exception:
HfHubHTTPError Traceback (most recent call last) File ~/anaconda3/envs/torch_base/lib/python3.9/site-packages/huggingface_hub/hf_api.py:3365, in HfApi.create_repo(self, repo_id, token, private, repo_type, exist_ok, space_sdk, space_hardware, space_storage, space_sleep_time, space_secrets, space_variables) 3364 try: -> 3365 hf_raise_for_status(r) 3366 except HTTPError as err:
File ~/anaconda3/envs/torch_base/lib/python3.9/site-packages/huggingface_hub/utils/_errors.py:367, in hf_raise_for_status(response, endpoint_name)
361 message = (
362 f"\n\n{response.status_code} Forbidden: {error_message}."
363 + f"\nCannot access content at: {response.url}."
364 + "\nIf you are trying to create or update content,"
365 + "make sure you have a token with the write
role."
366 )
--> 367 raise HfHubHTTPError(message, response=response) from e
369 # Convert HTTPError
into a HfHubHTTPError
to display request information
370 # as well (request id and/or server error message)
HfHubHTTPError: (Request ID: Root=1-66098c67-623a32fa7baef77772ebe4e9;c6b35efb-5559-4df5-a492-64422dfd065c)
403 Forbidden: You don't have the rights to create a model under the namespace "cc1314".
Cannot access content at: https://huggingface.co/api/repos/create.
If you are trying to create or update content,make sure you have a token with the write
role.
During handling of the above exception, another exception occurred:
HTTPError Traceback (most recent call last) File ~/anaconda3/envs/torch_base/lib/python3.9/site-packages/huggingface_hub/utils/_errors.py:304, in hf_raise_for_status(response, endpoint_name) 303 try: --> 304 response.raise_for_status() 305 except HTTPError as e:
File ~/anaconda3/envs/torch_base/lib/python3.9/site-packages/requests/models.py:1021, in Response.raise_for_status(self) 1020 if http_error_msg: -> 1021 raise HTTPError(http_error_msg, response=self)
HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/api/models/wav2vec2-large-xls-r-300m-turkish
The above exception was the direct cause of the following exception:
RepositoryNotFoundError Traceback (most recent call last) Cell In[50], line 1 ----> 1 tokenizer.push_to_hub(repo_name)
File ~/anaconda3/envs/torch_base/lib/python3.9/site-packages/transformers/utils/hub.py:873, in PushToHubMixin.push_to_hub(self, repo_id, use_temp_dir, commit_message, private, token, max_shard_size, create_pr, safe_serialization, revision, commit_description, tags, **deprecated_kwargs) 870 repo_url = deprecated_kwargs.pop("repo_url", None) 871 organization = deprecated_kwargs.pop("organization", None) --> 873 repo_id = self._create_repo( 874 repo_id, private=private, token=token, repo_url=repo_url, organization=organization 875 ) 877 # Create a new empty model card and eventually tag it 878 model_card = create_and_tag_model_card( 879 repo_id, tags, token=token, ignore_metadata_errors=ignore_metadata_errors 880 )
File ~/anaconda3/envs/torch_base/lib/python3.9/site-packages/transformers/utils/hub.py:689, in PushToHubMixin._create_repo(self, repo_id, private, token, repo_url, organization) 686 repo_id = repo_id.split("/")[-1] 687 repo_id = f"{organization}/{repo_id}" --> 689 url = create_repo(repo_id=repo_id, token=token, private=private, exist_ok=True) 690 return url.repo_id
File ~/anaconda3/envs/torch_base/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py:119, in validate_hf_hub_args.
File ~/anaconda3/envs/torch_base/lib/python3.9/site-packages/huggingface_hub/hf_api.py:3373, in HfApi.create_repo(self, repo_id, token, private, repo_type, exist_ok, space_sdk, space_hardware, space_storage, space_sleep_time, space_secrets, space_variables) 3370 elif exist_ok and err.response.status_code == 403: 3371 # No write permission on the namespace but repo might already exist 3372 try: -> 3373 self.repo_info(repo_id=repo_id, repo_type=repo_type, token=token) 3374 if repo_type is None or repo_type == REPO_TYPE_MODEL: 3375 return RepoUrl(f"{self.endpoint}/{repo_id}")
File ~/anaconda3/envs/torch_base/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py:119, in validate_hf_hub_args.
File ~/anaconda3/envs/torch_base/lib/python3.9/site-packages/huggingface_hub/hf_api.py:2423, in HfApi.repo_info(self, repo_id, revision, repo_type, timeout, files_metadata, token) 2421 else: 2422 raise ValueError("Unsupported repo type.") -> 2423 return method( 2424 repo_id, 2425 revision=revision, 2426 token=token, 2427 timeout=timeout, 2428 files_metadata=files_metadata, 2429 )
File ~/anaconda3/envs/torch_base/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py:119, in validate_hf_hub_args.
File ~/anaconda3/envs/torch_base/lib/python3.9/site-packages/huggingface_hub/hf_api.py:2233, in HfApi.model_info(self, repo_id, revision, timeout, securityStatus, files_metadata, token) 2231 params["blobs"] = True 2232 r = get_session().get(path, headers=headers, timeout=timeout, params=params) -> 2233 hf_raise_for_status(r) 2234 data = r.json() 2235 return ModelInfo(**data)
File ~/anaconda3/envs/torch_base/lib/python3.9/site-packages/huggingface_hub/utils/_errors.py:352, in hf_raise_for_status(response, endpoint_name)
333 elif error_code == "RepoNotFound" or (
334 response.status_code == 401
335 and response.request is not None
(...)
342 # => for now, we process them as RepoNotFound
anyway.
343 # See https://gist.github.com/Wauplin/46c27ad266b15998ce56a6603796f0b9
344 message = (
345 f"{response.status_code} Client Error."
346 + "\n\n"
(...)
350 " make sure you are authenticated."
351 )
--> 352 raise RepositoryNotFoundError(message, response) from e
354 elif response.status_code == 400:
355 message = (
356 f"\n\nBad request for {endpoint_name} endpoint:" if endpoint_name is not None else "\n\nBad request:"
357 )
RepositoryNotFoundError: 404 Client Error. (Request ID: Root=1-66098c68-768998ca118983fc3dc79054;53021a04-3237-49fd-8ada-ad99bb04eb7f)
Repository Not Found for url: https://huggingface.co/api/models/wav2vec2-large-xls-r-300m-turkish.
Please make sure you specified the correct repo_id
and repo_type
.
If you are trying to access a private or gated repo, make sure you are authenticated.
Describe the bug
I was trying to push a dataset to the hub and kept getting the same error, caused by an
HfHubHTTPError
(403 Client Error
). To be sure that it wasn't the specific dataset I was using that was causing the problem, I made a quick dummy dataset (seen in the repoduction code) and got the same errors.Edit: Not sure if this is relevant, but the link shown here:
leads to this:
Reproduction
Logs
System info