Skip to content
Advertisement

Module ‘project_name’ has no attribute ‘celery’

I’m trying to set up a background task using celery and rabbitmq on django but I’m getting an error saying that my project has no attribute celery. I’m using PyCharm and installed celery through that.

I’m new to celery but I’ve read a lot of articles similar to this issue (AttributeError: module ‘module’ has no attribute ‘celery’ this one seems the closest but not sure it’s quite the same)

Project structure:

JavaScript

I run the following command:

JavaScript

But I get the following error:

JavaScript

celery.py file:

JavaScript

tasks.py file:

JavaScript

Advertisement

Answer

Just for the record: Put celery.py file into the main project file, not inside the app.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement