Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError when DEBUG = True #50

Open
smetroid opened this issue Feb 22, 2021 · 0 comments
Open

AssertionError when DEBUG = True #50

smetroid opened this issue Feb 22, 2021 · 0 comments

Comments

@smetroid
Copy link

Hello,

We're trying to build an API using flask-mysql. When flask has DEBUG=True we're getting the error below.

AssertionError
AssertionError: A setup function was called after the first request was handled. This usually indicates a bug in the application where a module was not imported and decorators or other functionality was called too late.
To fix this make sure to import all your view modules, database models and everything related at a central place before the application starts serving requests.

Once we remove the DEBUG flask option the application is able to communicate with the MYSQL database just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant