Error related to facebook/dpr-ctx_encoder-single-nq-base
Hi,I am trying to create a script using DPR modelfrom transformers import DPRContextEncoder

model = DPRContextEncoder.from_pretrained("facebook/dpr-ctx_encoder-single-nq-base")

model.save_pretrained("./dpr-ctx_encoder-single-nq-base")But I am getting this OS error:OSError: Can't load the model for 'facebook/dpr-ctx_encoder-single-nq-base'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. 
Otherwise, make sure 'facebook/dpr-ctx_encoder-single-nq-base' is the correct path to a directory containing a file named pytorch_model.bin, tf_model.h5, model.ckpt or flax_model.msgpack.What would be the reason for this?Thank you.
2024-12-09T06:20:05Z
make sure you don’t have a local directory with the same name.There may already be a directory with this name locally. It might be better to delete it and try with a different name.
2024-12-10T03:48:35Z
Thank you for the reply. Do you know whether these models stored in general? I checked my working directory and also the cache.  But couldn’t find it.
2024-12-10T04:21:52Z
It should be in one of those. In other words, it doesn’t seem to be there. The following are the details of the cache folder, but unless otherwise specified, it should be in the usual HF cache folder.There is a high possibility that this error is being caused by a different reason than the error message suggests…huggingface.coManage huggingface_hub cache-systemWe’re on a journey to advance and democratize artificial intelligence through open source and open science.Hmm, we’re lacking in clues.github.com/huggingface/transformersOSError: Can't load config for 'bert-base-uncasedopened03:27PM - 29 Jul 21 UTCclosed03:19PM - 30 Aug 21 UTCWinMinTun## Environment info
It happens in local machine, Colab, and my colleagues also.…- `transformers` version:
- Platform: Window, Colab
- Python version: 3.7
- PyTorch version (GPU?): 1.8.1 (GPU yes)
- Tensorflow version (GPU?):
- Using GPU in script?: Yes
- Using distributed or parallel set-up in script?: No

### Who can help
@LysandreJik It is to do with 'bert-base-uncased'

## Information
Hi, I m having this error suddenly this afternoon. It was all okay before for days. It happens in local machine, Colab and also to my colleagues. I can access this file in browser https://huggingface.co/bert-base-uncased/resolve/main/config.json no problem. Btw, I m from Singapore. Any urgent help will be appreciated because I m rushing some project and stuck there.

Thanks

![image](https://user-images.githubusercontent.com/22287008/127519960-114ef793-03f6-494e-ab10-7700b693b87d.png)

403 Client Error: Forbidden for url: https://huggingface.co/bert-base-uncased/resolve/main/config.json
---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/transformers/configuration_utils.py in get_config_dict(cls, pretrained_model_name_or_path, **kwargs)
    505                 use_auth_token=use_auth_token,
--> 506                 user_agent=user_agent,
    507             )

6 frames
HTTPError: 403 Client Error: Forbidden for url: https://huggingface.co/bert-base-uncased/resolve/main/config.json
During handling of the above exception, another exception occurred:

OSError                                   Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/transformers/configuration_utils.py in get_config_dict(cls, pretrained_model_name_or_path, **kwargs)
    516                 f"- or '{pretrained_model_name_or_path}' is the correct path to a directory containing a {CONFIG_NAME} file\n\n"
    517             )
--> 518             raise EnvironmentError(msg)
    519 
    520         except json.JSONDecodeError:

OSError: Can't load config for 'bert-base-uncased'. Make sure that:

- 'bert-base-uncased' is a correct model identifier listed on 'https://huggingface.co/models'

- or 'bert-base-uncased' is the correct path to a directory containing a config.json file