File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change 3232 sys .exit (0 )
3333 except :
3434 os ._exit (0 )
35-
35+ IMPORT_ERRORS = ''
3636try :
3737 import tkinter .ttk as ttk
3838 from tkinter import *
3939 from PIL import ImageTk
40- except :
41- print (
42- "[ERROR] Tkinter dependency not installed. Please follow troubleshooting page: https://github.com/mathoudebine/turing-smart-screen-python/wiki/Troubleshooting#all-os-tkinter-dependency-not-installed" )
43- try :
44- sys .exit (0 )
45- except :
46- os ._exit (0 )
40+ except Exception as e :
41+ IMPORT_ERRORS += e .msg
42+ IMPORT_ERRORS += "\n "
4743
4844try :
4945 import psutil
5248 from PIL import Image
5349 from serial .tools .list_ports import comports
5450 from tktooltip import ToolTip
55- except :
56- print (
57- "[ERROR] Python dependencies not installed. Please follow start guide: https://github.com/mathoudebine/turing-smart-screen-python/wiki/System-monitor-:-how-to-start" )
51+ except Exception as e :
52+ IMPORT_ERRORS += e .msg
53+ IMPORT_ERRORS += "\n "
54+
55+ if IMPORT_ERRORS :
56+ IMPORT_ERRORS += "\n "
57+ IMPORT_ERRORS += "Please follow start guide: https://github.com/mathoudebine/turing-smart-screen-python/wiki/System-monitor-:-how-to-start"
58+ IMPORT_ERRORS += "\n "
59+ IMPORT_ERRORS += "Or the troubleshooting page troubleshooting page: https://github.com/mathoudebine/turing-smart-screen-python/wiki/Troubleshooting#all-os-tkinter-dependency-not-installed"
60+ print (IMPORT_ERRORS )
5861 try :
5962 sys .exit (0 )
6063 except :
You can’t perform that action at this time.
0 commit comments