tutorial 3 bug in pika client

321 views
Skip to first unread message

Daniel Child

unread,
Sep 21, 2017, 2:56:15 PM9/21/17
to rabbitmq-users
I and a colleague of mind have both encountered issues with tutorial 3 using the pika client. When specifying type='fanout' we independently got the same error:

  File "receive_logs.py", line 9, in <module>

    result = channel.queue_declare(exclusive=True, type='fanout')

TypeError: queue_declare() got an unexpected keyword argument 'type'


We are both newbies, but can't seem to find documentation on why this error would happen.

Thanks.


Michael Klishin

unread,
Sep 21, 2017, 8:53:29 PM9/21/17
to rabbitm...@googlegroups.com
Queues do not have types, exchanges do, so you are right.

Interestingly this is not present in the runnable tutorials repo:

I will take a look. Thank you for reporting!

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Michael Klishin

unread,
Sep 21, 2017, 8:57:02 PM9/21/17
to rabbitm...@googlegroups.com
Sorry but I don't see

queue_declare(exclusive=True, type='fanout')

in the text either:


GitHub search reveals no such appearances in master:

So either you are looking at a different place or you and your colleague managed to make the same mistake :)

Perhaps this tutorial would clarify the concepts? http://www.rabbitmq.com/tutorials/amqp-concepts.html


On Thu, Sep 21, 2017 at 8:53 PM, Michael Klishin <mkli...@pivotal.io> wrote:
Queues do not have types, exchanges do, so you are right.

Interestingly this is not present in the runnable tutorials repo:

I will take a look. Thank you for reporting!
On Thu, Sep 21, 2017 at 2:56 PM, Daniel Child <wdc...@gmail.com> wrote:
I and a colleague of mind have both encountered issues with tutorial 3 using the pika client. When specifying type='fanout' we independently got the same error:

  File "receive_logs.py", line 9, in <module>

    result = channel.queue_declare(exclusive=True, type='fanout')

TypeError: queue_declare() got an unexpected keyword argument 'type'


We are both newbies, but can't seem to find documentation on why this error would happen.

Thanks.


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Daniel Child

unread,
Sep 22, 2017, 2:10:03 AM9/22/17
to rabbitm...@googlegroups.com
My mistake … not queue_declare, exchange_declare.

We’re not imagining it. I’m sending a screenshot (see below). The same error is in Tutorials 3, 4, and 5. The fix is super simple: type = X -> exchange_type = X (where X = fanout / direct …)

The same error occurs in the other tutorials. This image was from:


Thanks for looking into it.

You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/YbIno7oQglg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rabbitmq-user...@googlegroups.com.

Michael Klishin

unread,
Sep 22, 2017, 8:53:29 AM9/22/17
to rabbitm...@googlegroups.com
OK, this seems to be an argument change in Pika 0.11.

Feel free to look into a small pull request for https://github.com/rabbitmq/rabbitmq-tutorials/

To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
-- 
MK

Staff Software Engineer, Pivotal/RabbitMQ



-- 
MK

Staff Software Engineer, Pivotal/RabbitMQ

-- 
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/YbIno7oQglg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Luke Bakken

unread,
Sep 22, 2017, 2:39:24 PM9/22/17
to rabbitmq-users
Hi everyone -


Thanks for the report Daniel.

Michael Klishin

unread,
Sep 23, 2017, 1:30:14 PM9/23/17
to rabbitmq-users
https://github.com/rabbitmq/rabbitmq-website/pull/437 was amended to address tutorials 4 and 5, too,
and is now live.
Reply all
Reply to author
Forward
0 new messages