Skip to content

Error loading Celery application with Django module #625

Open
@CurtMRosenbladWheeler

Description

@CurtMRosenbladWheeler

Description:

When running the celery command with the -A or --app option, an error occurs while trying to load the specified module config.celery_app. The error message indicates that the module django.utils.itercompat is not found. This issue arises because django.utils.itercompat is no longer supported in Django 4.2.

Steps to Reproduce:

Install Celery and Django 4.2.
Run the command celery -A config.celery_app worker --loglevel=info.
Expected Behavior:
The specified module config.celery_app should be successfully loaded as the Celery application.

Actual Behavior:

The following error occurs:

Error: Invalid value for '-A' / '--app': 
Unable to load celery application.
While trying to load the module config.celery_app the following error occurred:
Traceback (most recent call last):
  ...
ModuleNotFoundError: No module named 'django.utils.itercompat'

Additional Information:

The issue occurs when trying to load the module config.celery_app.
The error suggests that the module django.utils.itercompat is not found.
This error is encountered because django.utils.itercompat is no longer supported in Django 4.2.

Possible Solution:

To resolve this issue, Celery needs to be updated to support Django 4.2. It may involve making changes to the Celery codebase to replace usages of django.utils.itercompat with alternative compatible methods or modules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions