trouble in setting celery tasks backend in Python

support @Ai Da,and you should maintain AsyncBackendMixin in redis.py.


I solved the problem. The main cause of the problem was that I was using Python 3.7. But, to my knowledge, Celery currently works with Python 3.6 and lower. I made the following changes to the Celery code:

  1. Renamed "C:\Users\myusername\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\celery\backends\async.py" to "C:\Users\myusername\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\celery\backends\asynchronous.py"

  2. Opened redis.py and changed every line that had the keyword "async" to "asynchronous".

Apparently,

async

is now a keyword in Python 3.

You can also read this link: https://github.com/celery/celery/issues/4500

Hopefully, this answer will help all those who have the same problem till a newer version of Celery is released.


UPDATE: This is the issue of Python 3.7. You could use Python 3.6 instead without such an issue. But, if you'd like to conitnue using Python 3.7 and celery[redis] you can use the above solution to resolve the issue.