# Can't load config for 'google/pegasus-pubmed'

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-config-for-google-pegasus-pubmed%2F1614%3E%5C
**Category:** 🤗Transformers\
**Created:** [October 18, 2020, 8:16pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-config-for-google-pegasus-pubmed%2F1614 "2020-10-18T20:16:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jessicalopez](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/jessicalopez/32/26666_2.png) [@jessicalopez](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjessicalopez)%5C
**Post date:** [October 18, 2020, 8:16pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-config-for-google-pegasus-pubmed%2F1614%2F1 "2020-10-18T20:16:58Z")

</div>

Hello!

Can anyone help me to resolve this problem?

Thank you

```
Traceback (most recent call last):
File "/home/venv/lib/python3.6/site 
packages/transformers/configuration_utils.py", line 359, in 
get_config_dictraise EnvironmentError
OSError

During handling of the above exception, another exception 
occurred:

Traceback (most recent call last):
File "/path/pegasus.py", line 86, in <module>
tokenizer = AutoTokenizer.from_pretrained(model_name)
File "/home/venv/lib/python3.6/site- 
packages/transformers/tokenization_auto.py", 
line 216, in from_pretrained 
config=AutoConfig.from_pretrained
(pretrained_model_name_or_path, **kwargs)
File "/home/venv/lib/python3.6/site- 
packages/transformers/configuration_auto.py", 
line 310, in from_pretrained
config_dict, _ = 
PretrainedConfig.get_config_dict
(pretrained_model_name_or_path, **kwargs)
File "/home/venv/lib/python3.6/site- 
packages/transformers/configuration_utils.py", 
line 368, in get_config_dict
raise EnvironmentError(msg)
OSError: Can't load config for 'google/pegasus- 
pubmed'. Make sure that:

- 'google/pegasus-pubmed' is a correct model 
identifier listed on 
'https://huggingface.co/models'

- or 'google/pegasus-pubmed' is the correct path 
to a directory containing a config.json file

```

Environment info is as follows:  
transformers: 3.0.2  
tensorflow and tensorflow-gpu: 1.15.2  
CUDA: V10.0.130  
python: 3.6.10

---

<div class="post-metadata">

**Author:** ![BramVanroy](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/bramvanroy/32/47360_2.png) [@BramVanroy](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBramVanroy)%5C
**Post date:** [October 18, 2020, 9:39pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-config-for-google-pegasus-pubmed%2F1614%2F2 "2020-10-18T21:39:00Z")

</div>

I think Pegasus was only introduced in v3.1.0 so you’ll need to update your `transformers` library.

```bash
pip install -U transformers

```

---

<div class="post-metadata">

**Author:** ![jessicalopez](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/jessicalopez/32/26666_2.png) [@jessicalopez](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjessicalopez)%5C
**Post date:** [October 18, 2020, 11:56pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-config-for-google-pegasus-pubmed%2F1614%2F3 "2020-10-18T23:56:48Z")

</div>

Hello!

Thank you so much! It works. However, also it’s necessary to update at least the Tensorflow 2.2 version.

Reference:  
[https://github.com/huggingface/transformers/issues/7333](https://github.com/huggingface/transformers/issues/7333)

---

<div class="post-metadata">

**Author:** ![hemangjoshi37a](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/hemangjoshi37a/32/6011_2.png) [@hemangjoshi37a](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhemangjoshi37a)%5C
**Post date:** [September 12, 2022, 11:27am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-config-for-google-pegasus-pubmed%2F1614%2F4 "2022-09-12T11:27:09Z")

</div>

runnign this command and authenticating it solved issue: `huggingface-cli login`  
[https://hjlabs.in](https://hjlabs.in/)
