1

我最近升级到 Python 3.3.5。在这一点上,我几乎已经让一切正常工作,但 celery/kombu 似乎很不开心。看来kombu中可能存在错误,但我不确定。我希望这是我缺少的东西。任何帮助将不胜感激。谢谢。

(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'
4

1 回答 1

2

事实证明,django-kombu 被移入了 kombu 核心。因此,以下更改让我重新开始工作:

  1. 卸载 django-kombu
  2. 在设置中,从 中删除djkombuINSTALLED_APPS替换为kombu.transport.django.
  3. 在设置中,更新BROKER_BACKENDdjango
于 2014-10-14T15:13:31.947 回答