From 8bcbde8056e564516eebba37784b941eea3cb0e9 Mon Sep 17 00:00:00 2001 From: Tobi <150724275+TobiasDemuth@users.noreply.github.com> Date: Thu, 15 Feb 2024 21:44:50 +0100 Subject: [PATCH] hotfix for no wikipage --- assistant_ghost.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assistant_ghost.py b/assistant_ghost.py index cbc1fc5..0ee0043 100644 --- a/assistant_ghost.py +++ b/assistant_ghost.py @@ -196,8 +196,11 @@ def zoom_scale(user_input): return pyautogui.hotkey('ctrl', '-') def get_wikipedia(user_input): + try: result = wikipedia.summary(user_input,1) return result + except: + return "no wikipage found" # ---------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------------