[rabbitmq-discuss] Python / QPID to RabbitMQ....SUCCESS
    Lynton Grice 
    lynton.grice at netweaverguru.com
       
    Mon Oct  1 19:05:10 BST 2007
    
    
  
Hi there,
As mentioned in my last mail I can now run the code via the shell but can't
get it to work through WingIDE (for Python).
Well I have just upgraded to version 3.0 of WingIDE and SUCCESS.....all
working now with RabbitMQ.....
I must have had some strange config on my previous version or something.....
See attached screenshot to show it working in Wing...
Thanks again
Lynton
-----Original Message-----
From: Dmitriy Samovskiy [mailto:dmitriy.samovskiy at cohesiveft.com] 
Sent: 01 October 2007 05:01 PM
To: Lynton Grice
Cc: rabbitmq-discuss at lists.rabbitmq.com
Subject: Re: [rabbitmq-discuss] Python / QPID to RabbitMQ....no MLLIB??
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Wing IDE.jpg
Type: image/jpeg
Size: 35588 bytes
Desc: not available
Url : http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20071001/b72a5631/attachment.jpg 
    
    
More information about the rabbitmq-discuss
mailing list