[Fixed]-How to solve the a celery worker configuration with keyword argument namespace='"CELERY"error in the celery file

27👍

The uppercase namespace means that all celery configurations must be specified with uppercase instead of lowercase, and start with CELERY_, so that for example, task_always_eager settings becomes CELERY_TASK_ALWAYS_EAGER, and the broker_url becomes CELERY_BROKER_URL ans so on. This configuration was introduced from celery4.0 onwards.

So, for version <4 you don’t need namespace in line:

app.config_from_object('django.conf:settings', namespace='CELERY')

Replace the above with:

app.config_from_object('django.conf:settings')

NOTE: If you use celery 3.1, please check your Django version. It should be <1.8

Leave a comment