celery beat ExpressionDescriptor.py get_full_description

41 views Asked by At

I hope your day is going well. I've hit a bit of a snag with a Django project I’m working on. I'm relatively new to Django and would deeply appreciate it if you could spare a moment to help me troubleshoot an issue. I'm using Celery Beat for scheduling periodic tasks. I have a view in the admin where I check and set periodic tasks, but recently a strange error has appeared, and I can't locate the issue. Whenever I try to open any admin view with periodic tasks, I get this type of error: enter image description here enter image description here

It indicates a problem with resolving the names of the crontabs:

During handling of the above exception (invalid literal for int() with base 10: '0DAY'), another exception occurred:

But I haven't changed anything in the database or modified anything with settings. Do you know how I can resolve this issue, or where to look for a solution? It's probably a default setup and nothing there is set or modified, and I also couldn't find any solution to my problem on the internet :(

I'm using :

django-celery-beat==2.5.0
Django==4.2.2

I do not have any external settings to celery beat in django project :(

1

There are 1 answers

0
Journeyman Coder On

The problem happens in the CrontabSchedule model object when it attempts to invoke the property human_readable. I noticed this when looking at the entries in the database for CrontabSchedule that I had one problematic row:

select * from django_celery_beat_crontabschedule;

id | minute | hour  | day_of_week | day_of_month | month_of_year |     timezone    

11 | 59     | 23    | sunday      | *            | *             | America/New_York

The day_of_week column should actually be an integer, where 0=Sunday, 1=Monday, etc. After updating the problematic entry in the database, this resolved the issue for me. Hope this helps!