[rabbitmq-discuss] Pika AttributeError: Channel instance has no attribute 'start_consuming'
KooT
rafalkot at gmail.com
Tue May 31 19:21:24 BST 2011
Downloaded source pika-0.9.5.tar.gz and then utar pika dir to the same
dir where is worker.py
rkot at a0:~$ ls -lah pika
total 412K
drwxr-xr-x 2 rkot 1000 4.0K 2011-05-31 20:16 .
drwxr-xr-x 22 rkot 1000 8.0K 2011-05-31 20:17 ..
-rw-r--r-- 1 rkot 1000 5.1K 2011-05-31 13:31 asyncore_adapter.py
-rw-r--r-- 1 rkot 1000 4.7K 2011-05-31 20:16 asyncore_adapter.pyc
-rw-r--r-- 1 rkot 1000 3.2K 2011-05-31 13:31 blocking_adapter.py
-rw-r--r-- 1 rkot 1000 1.5K 2011-05-31 20:16 blocking_adapter.pyc
-rw-r--r-- 1 rkot 1000 12K 2011-05-31 13:31 channel.py
-rw-r--r-- 1 rkot 1000 8.8K 2011-05-31 20:16 channel.pyc
-rw-r--r-- 1 rkot 1000 7.9K 2011-05-31 13:31 codec.py
-rw-r--r-- 1 rkot 1000 6.7K 2011-05-31 20:16 codec.pyc
-rw-r--r-- 1 rkot 1000 18K 2011-05-31 13:31 connection.py
-rw-r--r-- 1 rkot 1000 17K 2011-05-31 20:16 connection.pyc
-rw-r--r-- 1 rkot 1000 3.0K 2011-05-31 13:31 event.py
-rw-r--r-- 1 rkot 1000 1.4K 2011-05-31 20:16 event.pyc
-rw-r--r-- 1 rkot 1000 2.8K 2011-05-31 13:31 exceptions.py
-rw-r--r-- 1 rkot 1000 2.5K 2011-05-31 20:16 exceptions.pyc
-rw-r--r-- 1 rkot 1000 2.9K 2011-05-31 13:31 __init__.py
-rw-r--r-- 1 rkot 1000 1.1K 2011-05-31 20:16 __init__.pyc
-rw-r--r-- 1 rkot 1000 5.3K 2011-05-31 13:31 simplebuffer.py
-rw-r--r-- 1 rkot 1000 4.1K 2011-05-31 20:16 simplebuffer.pyc
-rw-r--r-- 1 rkot 1000 3.1K 2011-05-31 13:31 specbase.py
-rw-r--r-- 1 rkot 1000 2.0K 2011-05-31 20:16 specbase.pyc
-rw-r--r-- 1 rkot 1000 118K 2011-05-31 13:31 spec.py
-rw-r--r-- 1 rkot 1000 106K 2011-05-31 20:16 spec.pyc
-rw-r--r-- 1 rkot 1000 5.2K 2011-05-31 13:31 table.py
-rw-r--r-- 1 rkot 1000 2.5K 2011-05-31 20:16 table.pyc
On 31 Maj, 20:15, "Gavin M. Roy" <g... at myyearbook.com> wrote:
> Sounds like it may not be Pika 0.9.5, how did you install?
>
> What output do you get if you do:
>
> python -c "import pika;print pika.__version__"
>
>
>
>
>
>
>
> On Tue, May 31, 2011 at 2:10 PM, KooT <rafal... at gmail.com> wrote:
> > Yes, its worker.py from
> >http://www.rabbitmq.com/tutorials/tutorial-two-python.html
>
> > #!/usr/bin/env python
> > import pika
> > import time
>
> > connection = pika.BlockingConnection(pika.ConnectionParameters(
> > host='localhost'))
> > channel = connection.channel()
>
> > channel.queue_declare(queue='task_queue', durable=True)
> > print ' [*] Waiting for messages. To exit press CTRL+C'
>
> > def callback(ch, method, properties, body):
> > print " [x] Received %r" % (body,)
> > time.sleep( body.count('.') )
> > print " [x] Done"
> > ch.basic_ack(delivery_tag = method.delivery_tag)
>
> > channel.basic_qos(prefetch_count=1)
> > channel.basic_consume(callback,
> > queue='task_queue')
>
> > channel.start_consuming()
>
> > On 31 Maj, 16:02, "Gavin M. Roy" <g... at myyearbook.com> wrote:
> > > Are you using the BlockingConnection adapter?
>
> > > On Tuesday, May 31, 2011 at 9:30 AM, KooT wrote:
> > > > python worker.py
> > > > [*] Waiting for messages. To exit press CTRL+C
> > > > Traceback (most recent call last):
> > > > File "worker.py", line 22, in ?
> > > > channel.start_consuming()
> > > > AttributeError: Channel instance has no attribute 'start_consuming'
>
> > > > I got pika 0.9.5
> > > > _______________________________________________
> > > > rabbitmq-discuss mailing list
> > > > rabbitmq-disc... at lists.rabbitmq.com (mailto:
> > rabbitmq-disc... at lists.rabbitmq.com)
> > > >https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
> > > _______________________________________________
> > > rabbitmq-discuss mailing list
> > > rabbitmq-disc... at lists.rabbitmq.comhttps://
> > lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> > _______________________________________________
> > rabbitmq-discuss mailing list
> > rabbitmq-disc... at lists.rabbitmq.com
> >https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
>
> _______________________________________________
> 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