You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The synchronous receive appears to always fail with an AttributeError on waiting for basic_cancel in receive.py, when it does basic_ack on the very last message in the queue and then does basic_cancel on the same consume_promise:
$ python receive.py
[x] Received message {'body': 'Hello world!', 'exchange': '', 'consumer_tag': 'amq.ctag-V2fN9ND13qH4imH_uRQKRA', 'promise_number': 4, 'routing_key': 'test', 'headers': {'x-puka-delivery-tag': 1}, 'redelivered': False, 'delivery_tag': 1}
[x] Received message {'body': 'Hello world!', 'exchange': '', 'consumer_tag': 'amq.ctag-V2fN9ND13qH4imH_uRQKRA', 'promise_number': 4, 'routing_key': 'test', 'headers': {'x-puka-delivery-tag': 1}, 'redelivered': False, 'delivery_tag': 2}
[x] Received message {'body': 'Hello world!', 'exchange': '', 'consumer_tag': 'amq.ctag-V2fN9ND13qH4imH_uRQKRA', 'promise_number': 4, 'routing_key': 'test', 'headers': {'x-puka-delivery-tag': 1}, 'redelivered': False, 'delivery_tag': 3}
Traceback (most recent call last):
File "receive.py", line 27, in <module>
client.wait(consume_promise)
File "/usr/local/lib/python2.7/dist-packages/puka/connection.py", line 222, in wait
raise_errors=raise_errors)
File "/usr/local/lib/python2.7/dist-packages/puka/promise.py", line 35, in run_callback
return self._promises[number].run_callback(**kwargs)
File "/usr/local/lib/python2.7/dist-packages/puka/promise.py", line 134, in run_callback
if raise_errors and result.is_error:
AttributeError: 'NoneType' object has no attribute 'is_error'
This only happens on the very last message in the queue.
Is this an intended behavior? If it is, how should I cancel the consume more gracefully at the very end?
Thanks.
The text was updated successfully, but these errors were encountered:
Oh, I see. That makes sense, haha... The code snippets are copied directly from Basic Examples, "Synchronously receive three messages" in http://majek.github.io/puka/puka.html. The document probably should be updated there. Thanks!
I'm using the examples on synchronous send/receive in Basic Examples on this page: http://majek.github.io/puka/puka.html.
Call this receive.py:
and synchronous send (send.py):
The synchronous receive appears to always fail with an AttributeError on waiting for basic_cancel in receive.py, when it does basic_ack on the very last message in the queue and then does basic_cancel on the same consume_promise:
This only happens on the very last message in the queue.
Is this an intended behavior? If it is, how should I cancel the consume more gracefully at the very end?
Thanks.
The text was updated successfully, but these errors were encountered: