question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incompatibility with kombu 4.0

See original GitHub issue

When running the pub/sub example from the docs, I get the following error:

AttributeError: 'Connection' object has no attribute 'exchange_declare'

Full traceback is here:

https://gist.github.com/adwhit/5007a304d68891ead581e4c9035db205

Nameko version 2.4.2, Kombu version 4.0.0

If I drop down to Kombu 3.0.37, it works. Therefore I assume the problem is either with Kombu or the Nameko-Kombu interface.

Edit - I see you have recently updated setup.py to use a version < 4. Feel free to close this issue! I note that every other feature seemed to be working correctly so hopefully there will not be too much work to get 4.0 working.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:20 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
mattbennettcommented, May 2, 2018

The incompatibility is with pyamqp 2.x. They are not major, but fixing them required feature sniffing to keep supporting the older version of the library so we didn’t.

2.x has been out for long enough now though that I would be happy to upgrade and drop support for older versions.

Are you using both Celery and Nameko in the same process? If not, can’t you run them from different environments?

1reaction
levchikcommented, Dec 24, 2017

I don’t know if my problem deserves separate issue, but I have a problem now, which seems to be related to this topic. I have latest celery (4.1.0) in project which depends on kombu 4.1.0. Since I have also nameko, I can’t use pytest (and probably code that invokes calls to the nameko microservice, haven’t tested yet), it just fails with:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 397, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2404, in load
    self.require(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2427, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 875, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (kombu 4.1.0 (/usr/lib/python3.6/site-packages), Requirement.parse('kombu<4,>=3.0.1'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/pytest", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 50, in main
    config = _prepareconfig(args, plugins)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 160, in _prepareconfig
    pluginmanager=pluginmanager, args=args)
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 617, in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 222, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 216, in <lambda>
    firstresult=hook.spec_opts.get('firstresult'),
  File "/usr/lib/python3.6/site-packages/pluggy/callers.py", line 196, in _multicall
    gen.send(outcome)
  File "/usr/lib/python3.6/site-packages/_pytest/helpconfig.py", line 68, in pytest_cmdline_parse
    config = outcome.get_result()
  File "/usr/lib/python3.6/site-packages/pluggy/callers.py", line 76, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/usr/lib/python3.6/site-packages/pluggy/callers.py", line 180, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 943, in pytest_cmdline_parse
    self.parse(args)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 1108, in parse
    self._preparse(args, addopts=addopts)
  File "/usr/lib/python3.6/site-packages/_pytest/config.py", line 1071, in _preparse
    self.pluginmanager.load_setuptools_entrypoints('pytest11')
  File "/usr/lib/python3.6/site-packages/pluggy/__init__.py", line 402, in load_setuptools_entrypoints
    "Plugin %r could not be loaded: %s!" % (ep.name, e))
pluggy.PluginValidationError: Plugin 'pytest_nameko' could not be loaded: (kombu 4.1.0 (/usr/lib/python3.6/site-packages), Requirement.parse('kombu<4,>=3.0.1'))!

When lowering down kombu to 3.0.17 i get error from celery (something about imports and other errors as well).

Am I missing something obvious or I just can’t use nameko and celery in one project due to kombu versions mismatch (can you suggest something in this case)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change history — Kombu 5.2.4 documentation - Celery
Fixed SQS unittests. Fix: non kombu json message decoding in SQS transport (#1306). Add Github Actions CI (#1309). Update default pickle protocol version...
Read more >
kombu - PyPI
`Kombu` is a messaging library for Python. The aim of `Kombu` is to make messaging in Python as easy as possible by providing...
Read more >
Kombu Documentation - Celery
Kombu is a messaging library for Python. The aim of Kombu is to make messaging in Python as easy as possible by providing...
Read more >
Kombu Documentation - Read the Docs
Kombu is a messaging library for Python. The aim of Kombu is to make messaging in Python as easy as possible by providing...
Read more >
django with celery raise No module named 'kombu' when ...
You use celery 4.4.1 has requirement kombu<4.7,>=4.6.10, but you'll have kombu 4.6.8 which is incompatible. Please use:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found