Kombo + SQS + PyCurl, 'NoneType' object has no attribute 'call_repeatedly'
See original GitHub issueHi. I’m running the lastest Kombu master (w/ stable 4.0.2 Celery), SQS Broker, with Django DB Backend, and I run into this error.
[2017-05-31 08:08:47,205: ERROR/MainProcess] Pending callback raised: AttributeError("'NoneType' object has no attribute 'call_repeatedly'",)
Traceback (most recent call last):
File "/home/ubuntu/ies-league/venv/local/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 233, in perform_pending_operations
self._pending_operations.pop()()
File "/home/ubuntu/ies-league/venv/local/lib/python2.7/site-packages/vine/promises.py", line 139, in __call__
return self.throw()
File "/home/ubuntu/ies-league/venv/local/lib/python2.7/site-packages/vine/promises.py", line 136, in __call__
retval = fun(*final_args, **final_kwargs)
File "/home/ubuntu/ies-league/venv/local/lib/python2.7/site-packages/kombu/message.py", line 130, in ack_log_error
self.ack(multiple=multiple)
File "/home/ubuntu/ies-league/venv/local/lib/python2.7/site-packages/kombu/message.py", line 125, in ack
self.channel.basic_ack(self.delivery_tag, multiple=multiple)
File "/home/ubuntu/ies-league/venv/local/lib/python2.7/site-packages/kombu/transport/SQS.py", line 380, in basic_ack
self.asynsqs.delete_message(message['sqs_queue'],
File "/home/ubuntu/ies-league/venv/local/lib/python2.7/site-packages/kombu/transport/SQS.py", line 436, in asynsqs
region=self.region
File "/home/ubuntu/ies-league/venv/local/lib/python2.7/site-packages/kombu/async/aws/sqs/connection.py", line 27, in __init__
**kwargs
File "/home/ubuntu/ies-league/venv/local/lib/python2.7/site-packages/kombu/async/aws/connection.py", line 178, in __init__
**http_client_params)
File "/home/ubuntu/ies-league/venv/local/lib/python2.7/site-packages/kombu/async/aws/connection.py", line 151, in __init__
self._httpclient = http_client or get_client()
File "/home/ubuntu/ies-league/venv/local/lib/python2.7/site-packages/kombu/async/http/__init__.py", line 22, in get_client
client = hub._current_http_client = Client(hub, **kwargs)
File "/home/ubuntu/ies-league/venv/local/lib/python2.7/site-packages/kombu/async/http/__init__.py", line 13, in Client
return CurlClient(hub, **kwargs)
File "/home/ubuntu/ies-league/venv/local/lib/python2.7/site-packages/kombu/async/http/curl.py", line 57, in __init__
self._timeout_check_tref = self.hub.call_repeatedly(
AttributeError: 'NoneType' object has no attribute 'call_repeatedly'
[2017-05-31 08:08:47,207: ERROR/MainProcess] Pending callback raised: AttributeError("'NoneType' object has no attribute 'call_repeatedly'",)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:17 (5 by maintainers)
Top Results From Across the Web
python - Celery + SQS - pycurl error - Stack Overflow
Looks like it could be an issue with the version of Celery (4.1.0) that you have. If I execute the same code after...
Read more >Elastic Beanstalk with Celery and SQS : r/django - Reddit
I got some error when I was deploying my app to EB. The error was "ImportError: The curl client requires the pycurl library."....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay, digging through the Kombu source code, it appears I needed to add the following near the top of my Consumer file:
This will ensure that a Hub object is returned when
get_event_loop()
is called inkombu/async/http/__init__.py
:What would be the harm in having
get_event_loop()
callset_event_loop(Hub())
if no event loop currently exists? I’d be happy to make a PR for this.Is this issue resolved, or which version is stable? I am experiencing the same issue.