1

I am learning Celery according to the official document, and just can't run the worker server. I followed this and get eventlet installed, but get this error:

Traceback (most recent call last):
  File "C:\Anaconda3\Lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Anaconda3\Lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\Scraper\CeleryEnv\Scripts\celery.exe\__main__.py", line 9, in <module>
  File "d:\scraper\celeryenv\lib\site-packages\celery\__main__.py", line 14, in main
    maybe_patch_concurrency()
  File "d:\scraper\celeryenv\lib\site-packages\celery\__init__.py", line 146, in maybe_patch_concurrency
    concurrency.get_implementation(pool)
  File "d:\scraper\celeryenv\lib\site-packages\celery\concurrency\__init__.py", line 23, in get_implementation
    return symbol_by_name(cls, ALIASES)
  File "d:\scraper\celeryenv\kombu\utils\imports.py", line 56, in symbol_by_name
    module = imp(module_name, package=package, **kwargs)
  File "d:\scraper\celeryenv\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "d:\scraper\celeryenv\lib\site-packages\celery\concurrency\eventlet.py", line 7, in <module>
    from kombu.asynchronous import timer as _timer  # noqa
ImportError: cannot import name 'timer'

The celery version is 4.1.1 and eventlet 0.23.0 on a Windows 10 platform. I checked the package directory, timer.py is under kombu/asynchronous. And I can't figure out how to fix this error. I tried celery-3.1.25, working correctly, is this the only option?

LuKa Chen
  • 33
  • 1
  • 6

0 Answers0