diff --git a/gcode_metadata/metadata.py b/gcode_metadata/metadata.py index 456c40d..7ceadbb 100644 --- a/gcode_metadata/metadata.py +++ b/gcode_metadata/metadata.py @@ -283,8 +283,8 @@ def load_cache(self): try: with open(self.cache_name, "r", encoding='utf-8') as file: cache_data = json.load(file) - preview = cache_data["preview"] - icon = cache_data["icon"] + preview = cache_data.get("preview") + icon = cache_data.get("icon") self.thumbnails = {}