Конфликт сельдерея и gunicorn при развертывании vps

я хочу развернуть проект django, но когда я ввожу эту команду: gunicorn project.wsgi, я получаю эту ошибку

[2024-03-17 08:39:59 -0400] [12173] [INFO] Starting gunicorn 20.0.4
    [2024-03-17 08:39:59 -0400] [12173] [INFO] Listening at: http://127.0.0.1:8000 (12173)
    [2024-03-17 08:39:59 -0400] [12173] [INFO] Using worker: sync
    [2024-03-17 08:39:59 -0400] [12176] [INFO] Booting worker with pid: 12176
    [2024-03-17 08:39:59 -0400] [12176] [ERROR] Exception in worker process
    Traceback (most recent call last):
      File "/usr/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
        worker.init_process()
      File "/usr/lib/python3.7/site-packages/gunicorn/workers/base.py", line 119, in init_process
        self.load_wsgi()
      File "/usr/lib/python3.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
        self.wsgi = self.app.wsgi()
      File "/usr/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
        self.callable = self.load()
      File "/usr/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
        return self.load_wsgiapp()
      File "/usr/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
        return util.import_app(self.app_uri)
      File "/usr/lib/python3.7/site-packages/gunicorn/util.py", line 358, in import_app
        mod = importlib.import_module(module)
      File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
      File "<frozen importlib._bootstrap>", line 983, in _find_and_load
      File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
      File "<frozen importlib._bootstrap>", line 983, in _find_and_load
      File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/root/reg_project/registration/project/__init__.py", line 2, in <module>
        from .celery import app as celery_app
      File "/root/reg_project/registration/project/celery.py", line 3, in <module>
        from celery import Celery
    ImportError: cannot import name 'Celery' from 'celery' (/usr/lib/python3.7/site-packages/celery/__init__.py)
    [2024-03-17 08:39:59 -0400] [12176] [INFO] Worker exiting (pid: 12176)
    [2024-03-17 08:39:59 -0400] [12173] [INFO] Shutting down: Master
    [2024-03-17 08:39:59 -0400] [12173] [INFO] Reason: Worker failed to boot.

это мой __init__.py:

    from __future__ import absolute_import, unicode_literals
    from .celery import app as celery_app

    __all__ = ['celery_app']

Я не знаю, как это исправить.

Я установил все зависимости моя celery версия 4.4.7 мой venv активен и gunicorn установлен также

Вернуться на верх