full-stack-fastapi-template
full-stack-fastapi-template copied to clipboard
Need to use "importlib-metadata<5.0" to use Celery
I meet an issue when docker-compose up -d
ImportError: cannot import name 'Celery' from 'celery' (/usr/local/lib/python3.7/site-packages/celery/__init__.py)
I fix it in this way.
(at data-backend/app/pyproject.toml)
...
[tool.poetry.dependencies]
python = "^3.7"
uvicorn = "^0.11.3"
fastapi = "^0.54.1"
python-multipart = "^0.0.5"
email-validator = "^1.0.5"
requests = "^2.23.0"
celery = "^4.4.2"
passlib = {extras = ["bcrypt"], version = "^1.7.2"}
tenacity = "^6.1.0"
pydantic = "^1.4"
emails = "^0.5.15"
raven = "^6.10.0"
gunicorn = "^20.0.4"
jinja2 = "^2.11.2"
psycopg2-binary = "^2.8.5"
alembic = "^1.4.2"
sqlalchemy = "^1.3.16"
pytest = "^5.4.1"
python-jose = {extras = ["cryptography"], version = "^3.1.0"}
importlib-metadata = "<5.0"
...
Reference Issue
https://github.com/celery/celery/issues/7783
I think origin issue were solved, but I have no idea how to apply that on this project...