From a26de5ce796fac72fee15d276c2dc719af51d6c4 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 18 Mar 2020 11:17:23 +0100 Subject: [PATCH] Gracefully handle the sitation if the changelog was not found CURA-4R --- cura/UI/TextManager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cura/UI/TextManager.py b/cura/UI/TextManager.py index 86838a0b48..dbe7940f26 100644 --- a/cura/UI/TextManager.py +++ b/cura/UI/TextManager.py @@ -28,7 +28,11 @@ class TextManager(QObject): def _loadChangeLogText(self) -> str: # Load change log texts and organize them with a dict - file_path = Resources.getPath(Resources.Texts, "change_log.txt") + try: + file_path = Resources.getPath(Resources.Texts, "change_log.txt") + except FileNotFoundError: + # I have no idea how / when this happens, but we're getting crash reports about it. + return "" change_logs_dict = {} # type: Dict[Version, Dict[str, List[str]]] with open(file_path, "r", encoding = "utf-8") as f: open_version = None # type: Optional[Version]