File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 55setup_certs ()
66
77import contextlib
8+ import logging
89import os
910import sys
1011import tkinter as tk
2122from app .desktop .desktop_server import ThreadedServer , server_config
2223from app .desktop .util .resource_limits import setup_resource_limits
2324
25+ logger = logging .getLogger (__name__ )
26+
2427# Set writeable cache directories as soon as we start
2528os .environ ["LLAMA_INDEX_CACHE_DIR" ] = os .path .join (
2629 Config .settings_dir (), "cache" , "llama_index_cache"
@@ -122,8 +125,17 @@ def run_tray(self):
122125
123126 self .tray = KilnTray ("kiln" , tray_image , "Kiln" , menu )
124127
125- # running detached since we use tk mainloop to get events from dock icon
126- self .tray .run_detached ()
128+ try :
129+ # running detached since we use tk mainloop to get events from dock icon
130+ self .tray .run_detached ()
131+ except Exception :
132+ logger .error ("Error running tray" , exc_info = True )
133+ # Tray not starting on MacOS or Windows is critical.
134+ # Let Linux continue to start the app as tray is more fragmented there and requires system deps.
135+ if sys .platform in ["darwin" , "win32" ]:
136+ raise
137+ else :
138+ self .tray = None
127139
128140 def close_splash (self ):
129141 try :
You can’t perform that action at this time.
0 commit comments