[rabbitmq-discuss] Pika 0.9.5 KeyError: Tx.SelectOk

Gavin M. Roy gmr at myyearbook.com
Wed Mar 14 20:52:47 GMT 2012


Hi Matt, 

I'll have to go back through and look at the fixed bugs. I know I've applied a fair amount of fixes to BlockingConnection, I'd not be surprised if this was one of them. There is a known blocker in Github master right now, but I expect to see 0.9.6 drop "real soon"

Feel free to check the issues list at http://github.com/pika/pika

Gavin 


On Wednesday, March 14, 2012 at 4:40 PM, Matt Pietrek wrote:

> I'm experiencing a KeyError exception, where the key is "Tx.SelectOk" when using Pika 0.9.5.
> 
> The scenario: A simple program that simply writes two messages a second to a queue. While this test is running, I stop the broker, then restart it a few seconds later. I explicitly check for AMQPConnectionError exceptions, and if seen reconnect to the broker. About half the time, the test works as intended. However, other times I see the KeyError exception, which my guess is not what's intended.
> 
> My writing code looks like this:
>             try:
>                 channel = self._channel
>                 channel.tx_select()
>                 channel.basic_publish(exchange='',
>                     routing_key=queue_name,
>                     body=json_string,
>                     properties=pika.BasicProperties(delivery_mode=2))
>                 channel.tx_commit()
>                 return
>             except AMQPConnectionError as e:
>                 self._reconnect()
> 
> 
> 
> Digging into the traceback data, the faulting line is in Pika's blocking_connection.py:rpc()
> 
>         # Find our reply in our list of replies
>         for reply in self._replies:
>             if reply in replies:
>                 frame = self._frames[reply] # THIS HERE IS THE LINE
>                 self._received_response = True
>                 if callback:
>                     callback(frame)
>                 del(self._frames[reply])
>                 return frame
> 
> 
> Known issue? Expected and acceptable? Thoughts?
> 
> Thanks,
> 
> Matt 
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com (mailto:rabbitmq-discuss at lists.rabbitmq.com)
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120314/5a72d7f4/attachment.htm>


More information about the rabbitmq-discuss mailing list