# Can't save ConvBert tokenizer

**URL:** <https://discuss.huggingface.co/t/cant-save-convbert-tokenizer/16006>\
**Category:** 🤗Tokenizers\
**Created:** [March 23, 2022, 4:48pm UTC](https://discuss.huggingface.co/t/cant-save-convbert-tokenizer/16006 "2022-03-23T16:48:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gozdi](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/gozdi/32/4221_2.png) [@Gozdi](https://discuss.huggingface.co/u/Gozdi)\
**Post date:** [March 23, 2022, 4:48pm UTC](https://discuss.huggingface.co/t/cant-save-convbert-tokenizer/16006/1 "2022-03-23T16:48:52Z")

</div>

When i try to use tokenizer.save\_pretrained()  
i get this error

```auto
PanicException Traceback (most recent call last)
<ipython-input-9-d95441fe8bb1> in <module>()
----> 1 tokenizer.save_pretrained('jebac_huggingface')

1 frames
/usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py in save_pretrained(self, save_directory, legacy_format, filename_prefix, push_to_hub, **kwargs)
   2106 file_names=file_names,
   2107 legacy_format=legacy_format,
-> 2108 filename_prefix=filename_prefix,
   2109 )
   2110 

/usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_fast.py in _save_pretrained(self, save_directory, file_names, legacy_format, filename_prefix)
    597 save_directory, (filename_prefix + "-" if filename_prefix else "") + TOKENIZER_FILE
    598 )
--> 599 self.backend_tokenizer.save(tokenizer_file)
    600 file_names = file_names + (tokenizer_file,)
    601 

PanicException: no entry found for key

```

what can i do about it??

---

<div class="post-metadata">

**Author:** ![sjq](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@sjq](https://discuss.huggingface.co/u/sjq)\
**Post date:** [December 4, 2022, 9:35am UTC](https://discuss.huggingface.co/t/cant-save-convbert-tokenizer/16006/2 "2022-12-04T09:35:32Z")

</div>

solved by:

```auto
tokenizer.save_pretrained(save_dir, legacy_format=True)

```
