From 9ef9316f73920f1fe5a5b25b0620ac82c7a4763d Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Mon, 29 Jan 2024 14:26:56 +0200 Subject: [PATCH] py : fix except (#5189) ggml-ci --- convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: