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

xdnny xdaan.dll at gmail.com
Fri Feb 17 16:19:46 GMT 2012


Hello,

well, for me it doesn't work.

OS: Scientific Linux 6.2 - 2.6.32-220.4.1.el6.i686 (RHEL)
Python: 2.6.6
Pika: 0.9.5
RabbitMQ: rabbitmq-server-2.6.1 (also tried rabbitmq-server-2.7.1 from
rabbitmq.com)

After running an example "send.py" from https://www.rabbitmq.com/tutorials/tutorial-one-python.html,
here is the error:

AttributeError: 'ProtocolHeader' object has no attribute
'channel_number'

Full stack trace:

python send.py
Traceback (most recent call last):
  File "send.py", line 7, in <module>
    host='localhost'))
  File "/usr/lib/python2.6/site-packages/pika/adapters/
blocking_connection.py", line 32, in __init__
    BaseConnection.__init__(self, parameters, None,
reconnection_strategy)
  File "/usr/lib/python2.6/site-packages/pika/adapters/
base_connection.py", line 50, in __init__
    reconnection_strategy)
  File "/usr/lib/python2.6/site-packages/pika/connection.py", line
170, in __init__
    self._connect()
  File "/usr/lib/python2.6/site-packages/pika/connection.py", line
228, in _connect
    self.parameters.port or  spec.PORT)
  File "/usr/lib/python2.6/site-packages/pika/adapters/
blocking_connection.py", line 44, in _adapter_connect
    self._handle_read()
  File "/usr/lib/python2.6/site-packages/pika/adapters/
base_connection.py", line 162, in _handle_read
    self._on_data_available(data)
  File "/usr/lib/python2.6/site-packages/pika/connection.py", line
597, in _on_data_available
    elif frame.channel_number > 0:
AttributeError: 'ProtocolHeader' object has no attribute
'channel_number'

On Jul 1 2011, 9:02 pm, Marek Majkowski <maje... at gmail.com> wrote:
> On Fri, Jul 1, 2011 at 20:05, Matt Pietrek <mpiet... at skytap.com> wrote:
> > Indeed. Lesson learned for me.
>
> > With the newer version (2.5.1), the sample app works as expected.
>
> > Thanks much to both of your for your replies,
>
> Yeah, sorry for that. RabbitMQ moves a bit faster than linux distributions :)
>
> (although, that's a lesson for us - client packages should support
> "old" releases!)
>
> I'm glad you were able to get it working.
>
> Cheers,
>    Marek
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list