Is there a quick way to resolve this inconsistent mode warning when running alembic migrations in fastapi?
Copy code
$ alembic upgrade XXXX
venv/lib/python3.10/site-packages/supertokens_python/utils.py:197: RuntimeWarning: Inconsistent mode detected, check if you are using the right asgi / wsgi mode
@davidrusu is supertokens actually affecting your migration? It's just a warning that you can resolve easily by changing the mode (programmatically or by hardcoding depending on how you're running the script)
d
davidrusu
08/08/2023, 3:29 PM
No, it doesn't affect the migration, but adds log noise (distracting from other important stuff)
davidrusu
08/08/2023, 3:30 PM
I guess the ideal scenario would be to skip supertokens init if not running in the specified mode?
k
KShivendu
08/09/2023, 6:44 AM
> skip supertokens init if not running in the specified mode?
yeah you can do that as well. See if there's a env var or something to differentiate them programmatically. simplest but not-so-clean solution would to just check sys.argv
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).