Flask Error: Unable to load celery application Flask Error: Unable to load celery application flask flask

Flask Error: Unable to load celery application


When invoking celery via

celery -A app.celery ...

celery will look for the name celery in the app namespace, expecting it to hold an instance of Celery. If you put that elsewhere (say, in app.auth.routes), then celery won't find it.

I have a working example you can crib from at https://github.com/davewsmith/flask-celery-starter

Or, refer to chapter 22 of the Flask Mega Tutorial, which uses rx instead of celery, but the general approach to structuring the code is similar.