[rabbitmq-discuss] Errors while running examples from RabbitMQ tutorial

Michael Morrison mwmorrison93 at gmail.com
Fri Dec 9 11:05:48 GMT 2011


Hello, i'm just getting started with RabbitMQ and have been reading through
the tutorials and trying to run the code samples in Python. I've installed
Pika 0.9.5 but when I run the following script, i get the error message
down below at the end of this post complaining that the 'CallbackManager'
object has no attribute 'sanitize': I'm not sure how to go about fixing
this, any help would be greatly appreciated.Thanks in advance for any
responses.

Mike

#!/usr/bin/env python
import pika

connection = pika.BlockingConnection(pika.ConnectionParameters(
        host='localhost'))
channel = connection.channel()

channel.queue_declare(queue='hello')

print ' [*] Waiting for messages. To exit press CTRL+C'

def callback(ch, method, properties, body):
    print " [x] Received %r" % (body,)

channel.basic_consume(callback,
                      queue='hello',
                      no_ack=True)

channel.start_consuming()

ERROR RETURNED:
Traceback (most recent call last):
  File "receive.py", line 6, in <module>
    channel = connection.channel()
  File "build/bdist.linux-i686/egg/pika/adapters/blocking_connection.py",
line 129, in channel
  File "build/bdist.linux-i686/egg/pika/adapters/blocking_connection.py",
line 274, in __init__
  File "build/bdist.linux-i686/egg/pika/channel.py", line 236, in open
  File "build/bdist.linux-i686/egg/pika/adapters/blocking_connection.py",
line 254, in send_method
  File "build/bdist.linux-i686/egg/pika/adapters/blocking_connection.py",
line 95, in process_data_events
  File "build/bdist.linux-i686/egg/pika/adapters/base_connection.py", line
315, in _handle_read
  File "build/bdist.linux-i686/egg/pika/connection.py", line 701, in
_on_data_available
  File "build/bdist.linux-i686/egg/pika/callback.py", line 161, in process
  File "build/bdist.linux-i686/egg/pika/adapters/blocking_connection.py",
line 230, in _on_rpc_complete
AttributeError: 'CallbackManager' object has no attribute 'sanitize'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20111209/b62b32cb/attachment.htm>


More information about the rabbitmq-discuss mailing list