File "C:\Users\Codertjay\PycharmProjects\Teems_App_Kid\teems_app_kid\__init__.py", line 5, in <module>
from .celery import app as celery_app File "C:\Users\Codertjay\PycharmProjects\Teems_App_Kid\teems_app_kid\celery.py", line 3, in <module>
from celery import Celery File "C:\Users\Codertjay\PycharmProjects\brownie\Teems_App_Kid\lib\site-packages\celery\five.py", line 306, in __getattr__
module = __import__(self._object_origins[name], None, None, [name]) File "C:\Users\Codertjay\PycharmProjects\brownie\Teems_App_Kid\lib\site-packages\celery\app\__init__.py", line 14, in <module>
from celery import _state File "C:\Users\Codertjay\PycharmProjects\brownie\Teems_App_Kid\lib\site-packages\celery\_state.py", line 20, in <module>
from celery.utils.threads import LocalStack File "C:\Users\Codertjay\PycharmProjects\brownie\Teems_App_Kid\lib\site-packages\celery\utils\__init__.py", line 20, in <module>
from collections import Callable ImportError: cannot import name 'Callable' from 'collections' (C:\Users\Codertjay\AppData\Local\Programs\Python\Python310\lib\collections\__init__.py)
Asked
Active
Viewed 7,265 times
3
-
I fixed this issue by changing my celery version from 3.* to 5.* and also removed django-celery – Codertjay Mar 11 '22 at 10:49
-
Callable is not in `collections`, do you mean the one from `typing`? – juanpa.arrivillaga Mar 11 '22 at 10:50
-
@juanpa.arrivillaga Back in 2016 `collections/__init__.py` had an import of `Callable` from [`_collections_abc.py`](https://github.com/python/cpython/blob/e501a93c18085a0ae0000a759438dcf3c162ddb6/Lib/_collections_abc.py). I guess it was unintentionally added to the celery code. – Klaus D. Mar 11 '22 at 11:05
-
@KlausD. Ah. Ok that makes sense – juanpa.arrivillaga Mar 11 '22 at 11:06
3 Answers
7
The offending line has been removed from Celery nearly 6 years ago. You should update the celery package to a recent version.

Klaus D.
- 13,874
- 5
- 41
- 48
2
I fixed the issue by changing celery to version 5.2 above and it started working thanks a lot

Codertjay
- 588
- 8
- 13