Spaces:
Sleeping
Sleeping
Commit History
-
π§ FIX: Runtime error from missing python-dotenvβ
Developerβ RUNTIME ERROR: - ModuleNotFoundError: No module named 'dotenv' - App crashed on startup despite successful build β IMMEDIATE FIX: 1. **Added python-dotenv to requirements.txt** - Missing from dependencies list - Required for environment variable loading 2. **Made dotenv import optional** - Graceful fallback if module missing - App continues without .env file support - No-op function replaces load_dotenv() π§ **Code Changes:** `python # Before (crashes): from dotenv import load_dotenv # After (safe): try: from dotenv import load_dotenv load_dotenv() except ImportError: print('Warning: python-dotenv not found') def load_dotenv(): pass ` β **Expected Result:** - App will start successfully - Environment variables will load if dotenv available - Graceful degradation if dotenv missing - No more runtime crashes on startup This ensures the app starts reliably on HF Spaces!a48a28c