jaimalklyde commited on
Commit
e706b82
·
verified ·
1 Parent(s): 3f43f3d

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +14 -3
src/streamlit_app.py CHANGED
@@ -245,13 +245,24 @@ def run_vortex_system():
245
  """)
246
 
247
  elif menu == "Data Explorer":
248
- st.markdown("<h1>🔬 DATA EXPLORER</h1>", unsafe_allow_html=True)
249
 
 
250
  if Data_Exploration and hasattr(Data_Exploration, 'show_terminal'):
251
- Data_Exploration.show_terminal(client, SHEET_NAME)
 
 
 
 
 
 
252
  else:
 
253
  st.error("❌ Module Data_Exploration non disponible")
254
- st.info("Vérifiez que le fichier `src/module/Data_Exploration.py` existe")
 
 
 
255
 
256
  elif menu == "AIP Terminal":
257
  st.markdown("<h1>🤖 INTERFACE AIP COMMAND</h1>", unsafe_allow_html=True)
 
245
  """)
246
 
247
  elif menu == "Data Explorer":
248
+ # Pas de titre ici, on laisse le module gérer son affichage pour éviter les doublons
249
 
250
+ # On vérifie que le module est chargé ET que la fonction existe
251
  if Data_Exploration and hasattr(Data_Exploration, 'show_terminal'):
252
+ try:
253
+ # On passe le relais au module
254
+ Data_Exploration.show_terminal(client, SHEET_NAME)
255
+ except Exception as e:
256
+ # Filet de sécurité en cas de crash INTERNE au module
257
+ st.error(f"💥 Erreur critique dans le module Data_Exploration : {e}")
258
+ st.exception(e) # Affiche la trace complète pour le débogage
259
  else:
260
+ # Gestion explicite des erreurs d'import
261
  st.error("❌ Module Data_Exploration non disponible")
262
+ if not Data_Exploration:
263
+ st.warning("Diagnostic : L'import initial a échoué (Variable = None).")
264
+ else:
265
+ st.warning("Diagnostic : Le module est chargé mais la fonction 'show_terminal' est introuvable.")
266
 
267
  elif menu == "AIP Terminal":
268
  st.markdown("<h1>🤖 INTERFACE AIP COMMAND</h1>", unsafe_allow_html=True)