Get_app('xxx') Error not font

sanic 20.12.6

app.py

from sanic import Sanic
app = Sanic(“a”)

db.py

from sanic import Sanic
app = Sanic.get_app(“a”)

sanic.exceptions.SanicException: Sanic app name “a” not found.

I would guess it’s probably and import ordering issue. You need the application to be declared before you can retrieve it from the registry.