When I am trying to start celery worker in Django app as:
celery -A myApp worker -l info
I get following error:
File \"/hom
The bug appears if an exception is raised while parsing settings. Such as when we set Django's SECRET_KEY
(or any other setting) via an environment variable:
SECRET_KEY = os.environ['SECRET_KEY']
To solve the problem you can switch back to:
SECRET_KEY = "asdfasdfasdf"
or use:
SECRET_KEY = os.environ.get('SECRET_KEY', '')
You can also find which setting caused the problem if you comment our the following line in celery.py
file and start the worker again:
app.config_from_object('django.conf:settings', namespace='CELERY')