我有一個(gè)工作的 django 項(xiàng)目,但在我將 django-filter 添加到我的需求文件后,我開始遇到芹菜錯誤。我正在使用 python 3.7,這里是已安裝包的列表 w/ 版本:Django-3.0.7amqp-2.6.0asgiref-3.2.7billiard-3.6.3.0celery-4.4.4certifi-2020.4.5.1chardet-3.0.4django-bootstrap3-12.1.0django-celery-results-1.2.1django-filter-2.2.0djangorestframework-3.11.0idna-2.9 importlib-metadata-1.6.0kombu-4.6.10ovirt-engine-sdk-python-4.4.3psycopg2-2.8.5pycurl-7.43.0.5python-gitlab-2.2.0pytz-2020.1redis-3.5.3requests-2.23.0six-1.15.0sqlparse-0.3.1urllib3-1.25.9vine-1.3.0zipp-3.1.0我決定刪除我使用過濾的代碼,只保留 pip 安裝包,但我仍然看到相同的錯誤。下面是一個(gè)相關(guān)的片段,但如有必要,我可以添加整個(gè)跟蹤。celery-beat_1 | [2020-06-04 18:11:33,145: CRITICAL/MainProcess] beat raised exception <class 'ModuleNotFoundError'>: ModuleNotFoundError("No module named 'future'")celery-beat_1 | Traceback (most recent call last):celery-beat_1 | File "/usr/local/lib/python3.7/site-packages/kombu/utils/objects.py", line 42, in __get__celery-beat_1 | return obj.__dict__[self.__name__]celery-beat_1 | KeyError: 'scheduler'celery-beat_1 | celery-beat_1 | During handling of the above exception, another exception occurred:celery-beat_1 | celery-beat_1 | Traceback (most recent call last):celery-beat_1 | File "/usr/local/lib/python3.7/site-packages/kombu/utils/objects.py", line 42, in __get__celery-beat_1 | return obj.__dict__[self.__name__]celery-beat_1 | KeyError: 'backend'...celery-beat_1 | [2020-06-04 18:11:33,161: WARNING/MainProcess] File "/usr/local/lib/python3.7/site-packages/celery/backends/base.py", line 10, in <module>celery-beat_1 | [2020-06-04 18:11:33,161: WARNING/MainProcess] from future.utils import raise_with_tracebackcelery-beat_1 | [2020-06-04 18:11:33,161: WARNING/MainProcess] ModuleNotFoundErrorcelery-beat_1 | [2020-06-04 18:11:33,161: WARNING/MainProcess] :celery-beat_1 | [2020-06-04 18:11:33,161: WARNING/MainProcess] No module named 'future'該項(xiàng)目是使用 docker compose 構(gòu)建的,用于設(shè)置 celery/redis/db/webapp。關(guān)于為什么 django-filter 破壞一切的任何想法?
Django 項(xiàng)目 celery 和 django-filter 導(dǎo)致錯誤
繁星點(diǎn)點(diǎn)滴滴
2022-12-27 15:25:36