0

I'm using my virtualenv and upon executing celery -A app beat -l info -S django, this error always displays. RuntimeError: Model class django_celery_beat.models.SolarSchedule doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

N.B: django_celery_beat already installed and migrated.

I have used the following versions, like

  1. Python Version: 3.8
  2. Celery Version: 5.1.1
  3. Celery-Beat Version: 2.2.1

But my expectation is to run celery smoothly :)

3 Answers 3

2

1- Ensure that django_celery_beat is included in the INSTALLED_APPS setting in your Django

2- Database Migrations running them again to ensure everything is up-to-date

Sign up to request clarification or add additional context in comments.

Comments

0

Can you add django_celery_beat to INSTALLED_APPS in your Apps settings.py file.

1 Comment

N.B: django_celery_beat already installed and migrated.
0

my application was working fine (with celery). after a while i faced with this issue at starting app.

so i found that in one of project files i imported a model as usual:

from test.models import History

then i replaced it with hardcoded path to model:

import sys
sys.path.insert(0, '/home/mohammad/project/test/models.py')

and it worked

UPDATE

make usre you dont have lifecycle problems and looped import

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.