当我尝试启动芹菜时没有名为'Queue'的模块

时间:2014-10-13 22:22:35

标签: django celery kombu

我最近升级到Python 3.3.5。我在这一点上几乎一切正常,但芹菜/昆布似乎非常不开心。看来kombu可能有一个bug,但我不确定。我希望这是我所缺少的。任何帮助将不胜感激。感谢。

(vgmdash33-env)The-Judge:vgmdash joshuafialkoff$ ./manage.py celeryd
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/djcelery/management/base.py", line 82, in run_from_argv
    return super(CeleryCommand, self).run_from_argv(argv)
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/djcelery/management/base.py", line 75, in execute
    super(CeleryCommand, self).execute(*args, **options)
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/djcelery/management/commands/celeryd.py", line 25, in handle
    worker.run(**options)
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/celery/bin/worker.py", line 212, in run
    state_db=self.node_format(state_db, hostname), **kwargs
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/celery/worker/__init__.py", line 100, in __init__
    self.setup_instance(**self.prepare_args(**kwargs))
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/celery/worker/__init__.py", line 126, in setup_instance
    self.should_use_eventloop() if use_eventloop is None
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/celery/worker/__init__.py", line 245, in should_use_eventloop
    self._conninfo.is_evented and not self.app.IS_WINDOWS)
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/kombu/connection.py", line 819, in is_evented
    return self.transport.supports_ev
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/kombu/connection.py", line 769, in transport
    self._transport = self.create_transport()
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/kombu/connection.py", line 514, in create_transport
    return self.get_transport_cls()(client=self)
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/kombu/connection.py", line 520, in get_transport_cls
    transport_cls = get_transport_cls(transport_cls)
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/kombu/transport/__init__.py", line 108, in get_transport_cls
    _transport_cache[transport] = resolve_transport(transport)
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/kombu/transport/__init__.py", line 92, in resolve_transport
    return symbol_by_name(transport)
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/kombu/utils/__init__.py", line 92, in symbol_by_name
    module = imp(module_name, package=package, **kwargs)
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 584, in _check_name_wrapper
  File "<frozen importlib._bootstrap>", line 1022, in load_module
  File "<frozen importlib._bootstrap>", line 1003, in load_module
  File "<frozen importlib._bootstrap>", line 560, in module_for_loader_wrapper
  File "<frozen importlib._bootstrap>", line 868, in _load_module
  File "<frozen importlib._bootstrap>", line 313, in _call_with_frames_removed
  File "/Users/joshuafialkoff/Envs/vgmdash33-env/lib/python3.3/site-packages/djkombu/transport.py", line 1, in <module>
    from Queue import Empty
ImportError: No module named 'Queue'

1 个答案:

答案 0 :(得分:2)

事实证明,django-kombu被移入了kombu核心。所以,以下变化让我的事情再次发挥作用:

  1. 卸载django-kombu
  2. 在设置中,从djkombu移除INSTALLED_APPS并替换为kombu.transport.django
  3. 在设置中,将BROKER_BACKEND更新为django