diff --git a/CHANGELOG.md b/CHANGELOG.md index 61c8251f6c..2b9a561259 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ No changes to highlight. - Fix "TypeError: issubclass() arg 1 must be a class" When use Optional[Types] by [@lingfengchencn](https://github.com/lingfengchencn) in [PR 4200](https://github.com/gradio-app/gradio/pull/4200). - Ensure cancelling functions work correctly by [@pngwn](https://github.com/pngwn) in [PR 4225](https://github.com/gradio-app/gradio/pull/4225) - Fixes a bug with typing.get_type_hints() on Python 3.9 by [@abidlabs](https://github.com/abidlabs) in [PR 4228](https://github.com/gradio-app/gradio/pull/4228). +- Fixes JSONDecodeError by [@davidai](https://github.com/davidai) in [PR 4241](https://github.com/gradio-app/gradio/pull/4241) - Fix `chatbot_dialogpt` demo by [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 4238](https://github.com/gradio-app/gradio/pull/4238). ## Other Changes: diff --git a/gradio/strings.py b/gradio/strings.py index 21b9f98c34..fb9efe9ef3 100644 --- a/gradio/strings.py +++ b/gradio/strings.py @@ -1,4 +1,3 @@ -import json import os import threading from typing import Dict @@ -38,11 +37,7 @@ def get_updated_messaging(en: Dict): try: updated_messaging = requests.get(MESSAGING_API_ENDPOINT, timeout=3).json() en.update(updated_messaging) - except ( - requests.ConnectionError, - requests.exceptions.ReadTimeout, - json.decoder.JSONDecodeError, - ): # Use default messaging + except Exception: # Use default messaging pass