Spaces:
Paused
Paused
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