diff --git a/jesse/services/cache.py b/jesse/services/cache.py index 1b2cc35ee..059aab29c 100644 --- a/jesse/services/cache.py +++ b/jesse/services/cache.py @@ -21,7 +21,7 @@ def __init__(self, path: str) -> None: with open(f"{self.path}cache_database.pickle", 'rb') as f: try: self.db = pickle.load(f) - except (EOFError, pickle.UnpicklingError): + except (EOFError, pickle.UnpicklingError, UnicodeDecodeError): # File got broken self.db = {} # if not, create a dict object. We'll create the file when using set_value()