From 30edf8d272b48d7387484b31cdf61b5bece410d7 Mon Sep 17 00:00:00 2001 From: Adolfo Delorenzo Date: Tue, 3 Jun 2025 00:50:45 -0600 Subject: [PATCH] Fix session manager initialization order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moved session manager initialization to after upload folder configuration to prevent TypeError when accessing UPLOAD_FOLDER config value. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index bd97eff..c82eedd 100644 --- a/app.py +++ b/app.py @@ -62,7 +62,6 @@ app = Flask(__name__) # Initialize configuration and secrets management init_config(app) init_secrets(app) -init_session_manager(app) # Configure CORS with security best practices cors_config = { @@ -108,6 +107,9 @@ except Exception as e: app.config['UPLOAD_FOLDER'] = upload_folder +# Initialize session management after upload folder is configured +init_session_manager(app) + # TTS configuration is already loaded from config.py # Warn if TTS API key is not set if not app.config.get('TTS_API_KEY'):