[rabbitmq-discuss] First Python sample (send.py) gives error: AttributeError: 'ProtocolHeader' object has no attribute 'channel_number'
Marek Majkowski
majek04 at gmail.com
Fri Jul 1 11:22:08 BST 2011
Matt,
Looks like you have a wrong version of pika.
Are you sure you have pika 0.9.5 exactly?
Have you installed it as suggested on the tutorial page, using pip:
pip install -e git+http://github.com/pika/pika.git@v0.9.5#egg=pika-v0.9.5
Cheers!
Marek
On Thu, Jun 30, 2011 at 23:13, Matt Pietrek <mpietrek at skytap.com> wrote:
> I've just now followed the directions verbatim from
> here: 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.
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
More information about the rabbitmq-discuss
mailing list