vince7lf / aerial_wildlife_detection

Tools for detecting wildlife in aerial images using active learning
MIT License
0 stars 0 forks source link

ImportError: cannot import name 'Celery' from 'celery' (/opt/conda/lib/python3.7/site-packages/celery/__init__.py) #67

Open vince7lf opened 1 year ago

vince7lf commented 1 year ago

error when building docker container (!!)

  for ep in importlib_metadata.entry_points().get(namespace, [])
aide_app_1  | AttributeError: 'EntryPoints' object has no attribute 'get'
aide_app_1  | Traceback (most recent call last):
aide_app_1  |   File "setup/assemble_server.py", line 19, in <module>
aide_app_1  |     from modules import REGISTERED_MODULES, Database
aide_app_1  |   File "/home/aide/app/modules/__init__.py", line 9, in <module>
aide_app_1  |     import celery_worker
aide_app_1  |   File "/home/aide/app/celery_worker.py", line 15, in <module>
aide_app_1  |     from celery import Celery
aide_app_1  | ImportError: cannot import name 'Celery' from 'celery' (/opt/conda/lib/python3.7/site-packages/celery/__init__.py)
vince7lf commented 1 year ago

Based on https://django.fun/en/qa/430090/

this error is a bug that occur only with python 3.7 (the same version you're using) because the latest release of importlib-metadata .

just downgrade importlib-metadata<5.0 : pip install importlib-metadata==4.13.0

vince7lf commented 1 year ago

testing on arbutus and local virtualbox

vince7lf commented 1 year ago

on arbutus, it takes very vey long long for the step Executing transaction: ...working... done

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
vince7lf commented 1 year ago

fixed adding importlib-metadata==4.13.0 into docker/requirements.txt