[rabbitmq-discuss] First Python sample (send.py) gives error: AttributeError: 'ProtocolHeader' object has no attribute 'channel_number'

Matt Pietrek mpietrek at skytap.com
Thu Jun 30 23:13:10 BST 2011


I've just now followed the directions verbatim from here:
http://www.rabbitmq.com/tutorials/tutorial-one-python.html
<http://www.rabbitmq.com/tutorials/tutorial-one-python.html>

I've copied/pasted the sample code for send.py and receive.py directly from
the web page so as to eliminate errors. Unfortunately, I'm getting the
following error:

foo at foo-desktop:~/rabbitmq-test$ python send.py
Traceback (most recent call last):
  File "send.py", line 4, in <module>
    connection = 
pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))
  File "/home/foo/src/pika-v0.9.5/pika/adapters/blocking_connection.py",
line 32, in __init__
    BaseConnection.__init__(self, parameters, None, reconnection_strategy)
  File "/home/foo/src/pika-v0.9.5/pika/adapters/base_connection.py", line
50, in __init__
    reconnection_strategy)
  File "/home/foo/src/pika-v0.9.5/pika/connection.py", line 170, in __init__
    self._connect()
  File "/home/foo/src/pika-v0.9.5/pika/connection.py", line 228, in _connect
    self.parameters.port or spec.PORT)
  File "/home/foo/src/pika-v0.9.5/pika/adapters/blocking_connection.py",
line 44, in _adapter_connect
    self._handle_read()
  File "/home/foo/src/pika-v0.9.5/pika/adapters/base_connection.py", line
162, in _handle_read
    self._on_data_available(data)
  File "/home/foo/src/pika-v0.9.5/pika/connection.py", line 597, in
_on_data_available
    elif frame.channel_number > 0:
AttributeError: 'ProtocolHeader' object has no attribute 'channel_number'


Python version is 2.6.5. I'm running this on an ubuntu 10.4 system. Pip and
Pika were downloaded today per the web site instructions.


I've searched everywhere and can't see the error referenced.


Many thanks to anybody that can help me.


Matt Pietrek.





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


More information about the rabbitmq-discuss mailing list