question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTTPError: 403 Client Error:

See original GitHub issue

I get a request error and I do not know why.


[W 2021-02-02 18:43:15,951] Trial 0 failed because of the following error: HTTPError('403 Client Error: Forbidden for url: https://sbert.net/models/bert-base-german-dbmdz-uncased.zip',)
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/optuna/_optimize.py", line 211, in _run_trial
    value_or_values = func(trial)
  File "<ipython-input-6-af5cb77f5b44>", line 40, in objective
    model = SentenceTransformer(model_name)  # distiluse-base-multilingual-cased-v2  distilbert-multilingual-nli-stsb-quora-ranking
  File "/usr/local/lib/python3.6/dist-packages/sentence_transformers/SentenceTransformer.py", line 92, in __init__
    raise e
  File "/usr/local/lib/python3.6/dist-packages/sentence_transformers/SentenceTransformer.py", line 75, in __init__
    http_get(model_url, zip_save_path)
  File "/usr/local/lib/python3.6/dist-packages/sentence_transformers/util.py", line 201, in http_get
    req.raise_for_status()
  File "/usr/local/lib/python3.6/dist-packages/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://sbert.net/models/bert-base-german-dbmdz-uncased.zip

HTTPError: 403 Client Error: Forbidden for url: https://sbert.net/models/bert-base-german-dbmdz-uncased.zip

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
nreimerscommented, Dec 6, 2021

There is currently an issue with the huggingface model hub, that specific files cannot be accessed. This affects each model and each user.

We currently look into this.

Have a look at: https://github.com/UKPLab/sentence-transformers/issues/1297

Current work-around is to access https://sbert.net/models and to download the needed model from there, unzip it and load it from disc.

1reaction
DirkWWcommented, Dec 6, 2021

I have a similar error although it was the first time I requested it today. Is there another limit?

model2 = SentenceTransformer(‘all-mpnet-base-v2’) Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “C:\Python36\lib\site-packages\sentence_transformers\SentenceTransformer.py”, line 84, in init ignore_files=[‘flax_model.msgpack’, ‘rust_model.ot’, ‘tf_model.h5’]) File “C:\Python36\lib\site-packages\sentence_transformers\util.py”, line 460, in snapshot_download user_agent=user_agent, File “C:\Python36\lib\site-packages\huggingface_hub\file_download.py”, line 351, in cached_download r.raise_for_status() File “C:\Python36\lib\site-packages\requests\models.py”, line 943, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://huggingface.co/sentence-transformers/all-mpnet-base-v2/resolve/86eb780758622d085bac2d7f6aea99c157a5ee28/.gitattributes

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP Error 403 Forbidden: What It Means and How to Fix It
The 403 (Forbidden) status code indicates that the server understood the request but refuses to authorize it...If authentication credentials ...
Read more >
403 Forbidden Error: What It Is and How to Fix It - Airbrake Blog
The 403 Forbidden Error is an HTTP response status code that indicates an identified client does not have proper authorization to access the...
Read more >
What Is a 403 Forbidden Error (and How Can I Fix It)?
A 403 Forbidden Error occurs when you do not have permission to access a web page or something else on a web server....
Read more >
"requests.exceptions.HTTPError: 403 Client Error: Forbidden ...
I want to implement a system using Method #1. I'm just wondering what to do differently to make that happen. The fact that...
Read more >
Troubleshoot HTTP 403 errors from API Gateway - Amazon AWS
An HTTP 403 response code means that a client is forbidden from accessing a valid URL. The server understands the request, but it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found