[rabbitmq-discuss] Python / QPID to RabbitMQ....no MLLIB??

Dmitriy Samovskiy dmitriy.samovskiy at cohesiveft.com
Mon Oct 1 16:01:07 BST 2007


Hi Lynton,

Lynton Grice wrote:
> 
> I get EXACTLY the same error when I try to run the "disttailf.py -c" after
> running disttailf.py d:\tmp\rabbit\rabbit.py.
> 
> The error seems to only be when I try to GET messages from
> RabbitMQ....putting them on is fine.....
> 
> Here is the error again:
> 
> AttributeError: __eq__
> 
> Traceback (innermost last):
> 
> File "d:\Documents and Settings\Lynton\Desktop\disttailf.py", line 1, in ?
> File "d:\Documents and Settings\Lynton\Desktop\disttailf.py", line 118, in ?
>   consumer(client, ch)
> File "d:\Documents and Settings\Lynton\Desktop\disttailf.py", line 38, in
> consumer
>   msg = python_queue.get(timeout=1)
> File "D:\Python24\Lib\site-packages\qpid\queue.py", line 46, in get
>   if result == Queue.END:
> File "D:\Python24\Lib\site-packages\qpid\message.py", line 61, in
> __getattr__
>   raise AttributeError(attr)
> 


The good news is that I was able to run your code and successfully 
sent/received a message. The bad news is that I still can't tell you 
what's wrong with your setup. But I am almost positive it's not related 
to rabbitmq or qpid python libraries.

To make a long story short, my interpreter also raises AttributeError on 
'__eq__' (which appears to be correct behavior). My interpreter however 
catches and processes this exception internally, vs. your interpreter 
doesn't.

What kind of python are you using? Original from python.org or something 
like ActivePython or maybe yet another flavor? I use original from 
python.org. Or maybe this is platform related (I use Debian Linux). 
Also, is it possible that you have more than one interpreter on your 
system and the one which you actually call is not the one from 
d:\python24\bin? Maybe try "d:\python24\bin\python.exe 
d:\tmp\rabbit\rabbit.py" ? These are just guesses however.

Here is my output from your code, with certain debug print outs from 
qpid.message.__getattr__():

inside __getattr__ Method(name=start, id=10) (8, 0, {'platform': 
'Erlang/OTP', 'product': 'RabbitMQ', 'version': '1.2.0', 'copyright': 
'Copyright (C) 2007 LShift Ltd., Cohesive Financial Technologies LLC., 
and Rabbit Technologies Ltd.', 'information': 'Licensed under the MPL. 
See http://www.rabbitmq.com/'}, 'PLAIN AMQPLAIN', 'en_US') content = 
None start_ok
res 2
result is <function respond at 0xa7954c34>

inside __getattr__ Method(name=tune, id=30) (0, 131072L, 0) content = 
None tune_ok
result is <function respond at 0xa7954c34>

Sending message "ping"...   done
Receiving message
inside __getattr__ Method(name=consume_ok, id=21) 
('amq.ctag13_rabbit at dsy025_20071001141609_',) content = None consumer_tag
result is amq.ctag13_rabbit at dsy025_20071001141609_

inside __getattr__ Method(name=deliver, id=60) 
('amq.ctag13_rabbit at dsy025_20071001141609_', 10000L, False, 
'amq.direct', 'test') content = {} ping consumer_tag
result is amq.ctag13_rabbit at dsy025_20071001141609_

inside __getattr__ Method(name=deliver, id=60) 
('amq.ctag13_rabbit at dsy025_20071001141609_', 10000L, False, 
'amq.direct', 'test') content = {} ping __eq__
raising AttributeError __eq__
inside __getattr__ Method(name=deliver, id=60) 
('amq.ctag13_rabbit at dsy025_20071001141609_', 10000L, False, 
'amq.direct', 'test') content = {} ping __coerce__
raising AttributeError __coerce__
inside __getattr__ Method(name=deliver, id=60) 
('amq.ctag13_rabbit at dsy025_20071001141609_', 10000L, False, 
'amq.direct', 'test') content = {} ping __cmp__
raising AttributeError __cmp__
Got message: ping




- Dmitriy




More information about the rabbitmq-discuss mailing list