| |
|
| | """
|
| | DEBUG STARTUP SCRIPT - Zeigt Fehler bei app.py Start
|
| | """
|
| |
|
| | import sys
|
| | import traceback
|
| | import subprocess
|
| |
|
| | print("\n" + "="*70)
|
| | print("🔧 DEBUGGING APP.PY STARTUP")
|
| | print("="*70 + "\n")
|
| |
|
| |
|
| | print("1️⃣ Versuche app.py zu importieren...")
|
| | try:
|
| | import app
|
| | print(" ✅ app.py erfolgreich importiert!")
|
| | except Exception as e:
|
| | print(f" ❌ FEHLER beim Import:")
|
| | print(f" {type(e).__name__}: {e}")
|
| | traceback.print_exc()
|
| | print("\n" + "="*70)
|
| | print("FIX VORSCHLÄGE:")
|
| | print("="*70)
|
| |
|
| | error_msg = str(e).lower()
|
| |
|
| | if 'modulenicht gefunden' in error_msg or 'no module' in error_msg:
|
| | print("- Fehlende Python-Abhängigkeit")
|
| | print("- Versuchen Sie: pip install -r requirements.txt")
|
| | elif 'trainings' in error_msg or 'json' in error_msg:
|
| | print("- Problem mit Trainings-Daten")
|
| | print("- Check ob training_master_optimized.json existiert")
|
| | print("- Command: cd c:\\Users\\noah1\\Desktop\\NoahsKI\\noahski_improved")
|
| | print(" python MEGA_TRAINING_SUPER_SCHLAU.py")
|
| | else:
|
| | print("- Unbekannter Fehler - siehe Stack Trace oben")
|
| |
|
| | sys.exit(1)
|
| |
|
| |
|
| | print("\n2️⃣ Starte Flask App...")
|
| | print("="*70 + "\n")
|
| |
|
| | try:
|
| |
|
| | app.app.run(
|
| | host='localhost',
|
| | port=5000,
|
| | debug=True,
|
| | use_reloader=False
|
| | )
|
| | except KeyboardInterrupt:
|
| | print("\n✅ Shutdown by user")
|
| | except Exception as e:
|
| | print(f"\n❌ FEHLER beim Starten:")
|
| | print(f"{type(e).__name__}: {e}")
|
| | traceback.print_exc()
|
| | sys.exit(1)
|
| |
|