Creo que lo que hizo fue agregar db.init_app(application) en application.py, no he tenido el error desde entonces.