Fixing lmsctl serve on Windows: A CLI Context Blocking Issue
Date: October 5, 2025 Category: Bug Fix Affected Platforms: Windows
The Problem
Windows users of NOW-LMS encountered a frustrating issue when trying to start the development server using the lmsctl serve command. Instead of the server starting normally, they would see this cryptic error message:
* Ignoring a call to 'app.run()' that would block the current 'flask' CLI command.
Only call 'app.run()' in an 'if __name__ == "__main__"' guard.
The server simply wouldn't start, making it impossible to run NOW-LMS on Windows through the standard CLI interface. This was particularly problematic for developers and instructors who needed to run the platform on Windows machines for training or development purposes.