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.

Issue Starting with AMQP Backend with Python 3.7

See original GitHub issue

I’m running the code through celery and an not sure how to get the right error message out of this stack dump. Seems like an error occurred and then when celery/kombu tried to handle it that process also barfed.

ingestbackend_1     | [2018-07-11 04:25:25,661: CRITICAL/MainProcess] Unrecoverable error: SyntaxError('invalid syntax', ('/usr/local/lib/python3.7/site-packages/celery/backends/rpc.py', 20, 11, 'from .async import AsyncBackendMixin, BaseResultConsumer\n'))
ingestbackend_1     | Traceback (most recent call last):
ingestbackend_1     |   File "/usr/local/lib/python3.7/site-packages/kombu/utils/objects.py", line 42, in __get__
ingestbackend_1     |     return obj.__dict__[self.__name__]
ingestbackend_1     | KeyError: 'backend'
ingestbackend_1     |
ingestbackend_1     | During handling of the above exception, another exception occurred:
ingestbackend_1     |
ingestbackend_1     | Traceback (most recent call last):
ingestbackend_1     |   File "/usr/local/lib/python3.7/site-packages/celery/worker/worker.py", line 205, in start
ingestbackend_1     |     self.blueprint.start(self)
ingestbackend_1     |   File "/usr/local/lib/python3.7/site-packages/celery/bootsteps.py", line 115, in start
ingestbackend_1     |     self.on_start()
ingestbackend_1     |   File "/usr/local/lib/python3.7/site-packages/celery/apps/worker.py", line 139, in on_start
ingestbackend_1     |     self.emit_banner()
ingestbackend_1     |   File "/usr/local/lib/python3.7/site-packages/celery/apps/worker.py", line 154, in emit_banner
ingestbackend_1     |     ' \n', self.startup_info(artlines=not use_image))),
ingestbackend_1     |   File "/usr/local/lib/python3.7/site-packages/celery/apps/worker.py", line 217, in startup_info
ingestbackend_1     |     results=self.app.backend.as_uri(),
ingestbackend_1     |   File "/usr/local/lib/python3.7/site-packages/kombu/utils/objects.py", line 44, in __get__
ingestbackend_1     |     value = obj.__dict__[self.__name__] = self.__get(obj)
ingestbackend_1     |   File "/usr/local/lib/python3.7/site-packages/celery/app/base.py", line 1196, in backend
ingestbackend_1     |     return self._get_backend()
ingestbackend_1     |   File "/usr/local/lib/python3.7/site-packages/celery/app/base.py", line 914, in _get_backend
ingestbackend_1     |     self.loader)
ingestbackend_1     |   File "/usr/local/lib/python3.7/site-packages/celery/app/backends.py", line 70, in by_url
ingestbackend_1     |     return by_name(backend, loader), url
ingestbackend_1     |   File "/usr/local/lib/python3.7/site-packages/celery/app/backends.py", line 50, in by_name
ingestbackend_1     |     cls = symbol_by_name(backend, aliases)
ingestbackend_1     |   File "/usr/local/lib/python3.7/site-packages/kombu/utils/imports.py", line 56, in symbol_by_name
ingestbackend_1     |     module = imp(module_name, package=package, **kwargs)
ingestbackend_1     |   File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
ingestbackend_1     |     return _bootstrap._gcd_import(name[level:], package, level)
ingestbackend_1     |   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
ingestbackend_1     |   File "<frozen importlib._bootstrap>", line 983, in _find_and_load
ingestbackend_1     |   File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
ingestbackend_1     |   File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
ingestbackend_1     |   File "<frozen importlib._bootstrap_external>", line 724, in exec_module
ingestbackend_1     |   File "<frozen importlib._bootstrap_external>", line 860, in get_code
ingestbackend_1     |   File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
ingestbackend_1     |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ingestbackend_1     |   File "/usr/local/lib/python3.7/site-packages/celery/backends/rpc.py", line 20
ingestbackend_1     |     from .async import AsyncBackendMixin, BaseResultConsumer
ingestbackend_1     |               ^
ingestbackend_1     | SyntaxError: invalid syntax

Any thoughts on how to debug this would be good.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
auvipycommented, Jul 11, 2018

well seems it’s celery issue and its fixed in celery master recently. celery isn;t officially supporting 3.7 yet, so either down grade to 3.6 or try celery master and report further issues

0reactions
yuriizinetscommented, Sep 13, 2018

Also, here is possible solution, but with modification of library code. https://stackoverflow.com/questions/51273659/trouble-in-setting-celery-tasks-backend-in-python/51308631

Read more comments on GitHub >

github_iconTop Results From Across the Web

celery-amqp-backend - PyPI
A rewrite of the original Celery AMQP result backend that supports Celery 5.0 and newer.
Read more >
trouble in setting celery tasks backend in Python
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...
Read more >
Connections - RabbitMQ
Connections. Overview. This guide covers various topics related to connections except for network tuning or most networking-related topics.
Read more >
Change history — Celery 4.4.6 documentation
fix filesystem backend cannot not be serialized by picked ... Py-AMQP 2.5.2. Python ... Riak Result Backend: Warn Riak backend users for possible...
Read more >
Detailed Installation — AiiDA 1.3.0 documentation
You are not reading the most recent version of this documentation. v2.1.2 is the ... brew install postgresql rabbitmq git python $ brew...
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