diff --git a/convert.py b/convert.py index b48afba1e..75c100118 100755 --- a/convert.py +++ b/convert.py @@ -336,7 +336,7 @@ class BpeVocab: self.bpe_tokenizer = json.loads(open(str(fname_tokenizer), encoding="utf-8").read()) try: self.vocab = self.bpe_tokenizer["model"]["vocab"] - except: + except KeyError: self.vocab = self.bpe_tokenizer added_tokens: dict[str, int] if fname_added_tokens is not None: