mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-21 01:01:05 +08:00
Fix JSONDecodeError (#4241)
* Fix JSONDecodeError bug (#4237) * Remove unused import * Clean up code * Fix JSONDecodeError (#4241) * Accept all Exceptions --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
parent
7664bb57f5
commit
39045d6eb1
@ -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:
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user