Sounds like it may not be Pika 0.9.5, how did you install?<div><br></div><div>What output do you get if you do:</div><div><br></div><div>python -c "import pika;print pika.__version__"<br><br><div class="gmail_quote">
On Tue, May 31, 2011 at 2:10 PM, KooT <span dir="ltr"><<a href="mailto:rafalkot@gmail.com" target="_blank">rafalkot@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yes, its worker.py from <a href="http://www.rabbitmq.com/tutorials/tutorial-two-python.html" target="_blank">http://www.rabbitmq.com/tutorials/tutorial-two-python.html</a><br>
<br>
#!/usr/bin/env python<br>
import pika<br>
import time<br>
<br>
connection = pika.BlockingConnection(pika.ConnectionParameters(<br>
host='localhost'))<br>
channel = connection.channel()<br>
<br>
channel.queue_declare(queue='task_queue', durable=True)<br>
print ' [*] Waiting for messages. To exit press CTRL+C'<br>
<br>
def callback(ch, method, properties, body):<br>
print " [x] Received %r" % (body,)<br>
time.sleep( body.count('.') )<br>
print " [x] Done"<br>
ch.basic_ack(delivery_tag = method.delivery_tag)<br>
<br>
channel.basic_qos(prefetch_count=1)<br>
channel.basic_consume(callback,<br>
queue='task_queue')<br>
<br>
channel.start_consuming()<br>
<div><br>
<br>
On 31 Maj, 16:02, "Gavin M. Roy" <<a href="mailto:g...@myyearbook.com" target="_blank">g...@myyearbook.com</a>> wrote:<br>
> Are you using the BlockingConnection adapter?<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> On Tuesday, May 31, 2011 at 9:30 AM, KooT wrote:<br>
> > python worker.py<br>
> > [*] Waiting for messages. To exit press CTRL+C<br>
> > Traceback (most recent call last):<br>
> > File "worker.py", line 22, in ?<br>
> > channel.start_consuming()<br>
> > AttributeError: Channel instance has no attribute 'start_consuming'<br>
><br>
> > I got pika 0.9.5<br>
> > _______________________________________________<br>
> > rabbitmq-discuss mailing list<br>
</div>> > <a href="mailto:rabbitmq-disc...@lists.rabbitmq.com" target="_blank">rabbitmq-disc...@lists.rabbitmq.com</a> (mailto:<a href="mailto:rabbitmq-disc...@lists.rabbitmq.com" target="_blank">rabbitmq-disc...@lists.rabbitmq.com</a>)<br>
<div>> ><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
><br>
><br>
><br>
</div>> _______________________________________________<br>
> rabbitmq-discuss mailing list<br>
> rabbitmq-disc...@lists.rabbitmq.comhttps://<a href="http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
<div><div></div><div>_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
</div></div></blockquote></div><br></div>