You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Rajika Kumarasiri <ra...@wso2.com> on 2010/12/13 13:23:50 UTC

Configuring qpid-* python scripts

I was trying to set up python scripts to monitor the C++ broker. So I just
got a checkout from the svn HEAD and build the python folder using python
"python setup.py build" and set the environment varible PYTHONPATH to point
to the python directory. Then I switch to the $PYTHONPATH/../tools/src/py
and tried to execute -

$python qpid-config --help, which ends up giving me the following error.
Traceback (most recent call last):
  File "qpid-config", line 26, in <module>
    from qmf.console import Session
ImportError: No module named qmf.console


It seems that I am missing a python module but I can not locate where it is.
Am I missing something ? Any help is appreciated.

Rajika

Re: C# client question

Posted by Adam Kaminiecki <ad...@dgt.com.pl>.
Hi,


Can anybody tell my after 60sec always get an error

"Connection lost"


I'm using qpid C++ broker 0.8 and .net client qpid-dotnet-0-10-0.8. 
<http://www.apache.net.pl//qpid/0.8/qpid-dotnet-0-10-0.8.zip>


I'm creating session like above:
session = connections.CreateSession(0);



Regards,
Adam

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


Re: C# client question

Posted by Adam Kaminiecki <ad...@dgt.com.pl>.
Guys again two more question :)

how to run client in failover mode?


connections.CreateSession(10);   time declared in Createsession is for 
what? If it's inactive then close? or always when time count down to 0 I 
need to reconnect??

Any example will be very helpfull.



Regards,
Adam



W dniu 2010-12-16 12:41, Adam Kaminiecki pisze:
> Thanks a lot I'm going to try it!! :)
>
> One more question
> connections.CreateSession(10);
>
> time declared in Createsession is for what? If it's inactive then 
> close? or always when time count down to 0 I need to reconnect??
>
> W dniu 2010-12-16 12:36, Chuck Rolke pisze:
>> Hi Adam,
>>
>> In the .NET Binding there is nothing like that directly. However, its 
>> pretty
>> easy to do. Create a connection to the broker. Then create a receiver 
>> that
>> gets to the queue you want by specifying the queue's address. Finally 
>> Fetch() a
>> message from that queue. From the examples the code looks like:
>>
>>      Receiver receiver = session.CreateReceiver(address);
>>      Message message = new Message();
>>      message = receiver.Fetch(DurationConstants.SECOND * 1);
>>
>> You could create a Duration with a value of zero to make Fetch return
>> right away if no message is present.
>>
>> -Chuck
>>
>> ----- "Adam Kaminiecki"<ad...@dgt.com.pl>  wrote:
>>
>>> From: "Adam Kaminiecki"<ad...@dgt.com.pl>
>>> To: users@qpid.apache.org
>>> Sent: Thursday, December 16, 2010 4:55:49 AM GMT -05:00 US/Canada 
>>> Eastern
>>> Subject: C# client question
>>>
>>> Hi,
>>>
>>> Is any method in C# client to ask server for message from queue
>>> something like SingleGet?
>>>
>>> For example
>>>
>>> im using method "singleGet" with parameters (queueName) and server
>>> return one message or null if queue is empty
>>>
>>> Is something like that in C# client??
>>>
>>>
>>>
>>> Regards,
>>> Adam
>>>
>>>
>>>
>>> -- 
>>> This message has been scanned for viruses and
>>> dangerous content by MailScanner, and is
>>> believed to be clean.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> Apache Qpid - AMQP Messaging Implementation
>>> Project:      http://qpid.apache.org
>>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project:      http://qpid.apache.org
>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>>
>>
>

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: C# client question

Posted by Adam Kaminiecki <ad...@dgt.com.pl>.
Thanks a lot I'm going to try it!! :)

One more question
connections.CreateSession(10);

time declared in Createsession is for what? If it's inactive then close? 
or always when time count down to 0 I need to reconnect??

W dniu 2010-12-16 12:36, Chuck Rolke pisze:
> Hi Adam,
>
> In the .NET Binding there is nothing like that directly. However, its pretty
> easy to do. Create a connection to the broker. Then create a receiver that
> gets to the queue you want by specifying the queue's address. Finally Fetch() a
> message from that queue. From the examples the code looks like:
>
>      Receiver receiver = session.CreateReceiver(address);
>      Message message = new Message();
>      message = receiver.Fetch(DurationConstants.SECOND * 1);
>
> You could create a Duration with a value of zero to make Fetch return
> right away if no message is present.
>
> -Chuck
>
> ----- "Adam Kaminiecki"<ad...@dgt.com.pl>  wrote:
>
>> From: "Adam Kaminiecki"<ad...@dgt.com.pl>
>> To: users@qpid.apache.org
>> Sent: Thursday, December 16, 2010 4:55:49 AM GMT -05:00 US/Canada Eastern
>> Subject: C# client question
>>
>> Hi,
>>
>> Is any method in C# client to ask server for message from queue
>> something like SingleGet?
>>
>> For example
>>
>> im using method "singleGet" with parameters (queueName) and server
>> return one message or null if queue is empty
>>
>> Is something like that in C# client??
>>
>>
>>
>> Regards,
>> Adam
>>
>>
>>
>> -- 
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project:      http://qpid.apache.org
>> Use/Interact: mailto:users-subscribe@qpid.apache.org
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: C# client question

Posted by Chuck Rolke <cr...@redhat.com>.
Hi Adam,

In the .NET Binding there is nothing like that directly. However, its pretty
easy to do. Create a connection to the broker. Then create a receiver that
gets to the queue you want by specifying the queue's address. Finally Fetch() a
message from that queue. From the examples the code looks like:

    Receiver receiver = session.CreateReceiver(address); 
    Message message = new Message();
    message = receiver.Fetch(DurationConstants.SECOND * 1);

You could create a Duration with a value of zero to make Fetch return
right away if no message is present.

-Chuck

----- "Adam Kaminiecki" <ad...@dgt.com.pl> wrote:

> From: "Adam Kaminiecki" <ad...@dgt.com.pl>
> To: users@qpid.apache.org
> Sent: Thursday, December 16, 2010 4:55:49 AM GMT -05:00 US/Canada Eastern
> Subject: C# client question
>
> Hi,
> 
> Is any method in C# client to ask server for message from queue 
> something like SingleGet?
> 
> For example
> 
> im using method "singleGet" with parameters (queueName) and server 
> return one message or null if queue is empty
> 
> Is something like that in C# client??
> 
> 
> 
> Regards,
> Adam
> 
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


RE: C# client question

Posted by Steve Huston <sh...@riverace.com>.
Did you try the Receiver's get method?

-Steve

--
Steve Huston, Riverace Corporation
Total Lifecycle Support for Your Networked Applications
http://www.riverace.com


> -----Original Message-----
> From: Adam Kaminiecki [mailto:adamka@dgt.com.pl] 
> Sent: Thursday, December 16, 2010 4:56 AM
> To: users@qpid.apache.org
> Subject: C# client question
> 
> 
> Hi,
> 
> Is any method in C# client to ask server for message from queue 
> something like SingleGet?
> 
> For example
> 
> im using method "singleGet" with parameters (queueName) and server 
> return one message or null if queue is empty
> 
> Is something like that in C# client??
> 
> 
> 
> Regards,
> Adam
> 
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
> 
> 


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


C# client question

Posted by Adam Kaminiecki <ad...@dgt.com.pl>.
Hi,

Is any method in C# client to ask server for message from queue 
something like SingleGet?

For example

im using method "singleGet" with parameters (queueName) and server 
return one message or null if queue is empty

Is something like that in C# client??



Regards,
Adam



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Configuring qpid-* python scripts

Posted by Lahiru Gunathilake <gl...@gmail.com>.
Yes rajika ... awesome digging ... and finding the issue !

Lahiru

On Thu, Dec 16, 2010 at 2:33 PM, Gordon Sim <gs...@redhat.com> wrote:

> On 12/16/2010 06:48 AM, Rajika Kumarasiri wrote:
>
>> I figured out. It's due to old version of Python interpreter bundled with
>> open office. I upgraded to Python version 2.6.6 and it works fine. Thanks
>> for the help.
>>
>
> Interesting. Thanks for reporting back.
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

Re: Configuring qpid-* python scripts

Posted by Gordon Sim <gs...@redhat.com>.
On 12/16/2010 06:48 AM, Rajika Kumarasiri wrote:
> I figured out. It's due to old version of Python interpreter bundled with
> open office. I upgraded to Python version 2.6.6 and it works fine. Thanks
> for the help.

Interesting. Thanks for reporting back.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Configuring qpid-* python scripts

Posted by Rajika Kumarasiri <ra...@wso2.com>.
I figured out. It's due to old version of Python interpreter bundled with
open office. I upgraded to Python version 2.6.6 and it works fine. Thanks
for the help.

Rajika

On Wed, Dec 15, 2010 at 8:33 PM, Rajika Kumarasiri <ra...@wso2.com> wrote:

> Do you see anything suspicious? I'll also upgrade to version 2.6.6 of
> Python and see how it goes.
>
> Rajika
>
> On Wed, Dec 15, 2010 at 8:06 AM, Rajika Kumarasiri <ra...@wso2.com>wrote:
>
>>
>>
>> On Wed, Dec 15, 2010 at 1:46 AM, Jonathan Robie <
>> jonathan.robie@redhat.com> wrote:
>>
>>> What does your PYTHONPATH look like?
>>>
>>
>> [rajika@localhost py]$ pwd
>> /home/rajika/projects/qpid/qpid/tools/src/py
>> [rajika@localhost py]$ echo $PYTHONPATH
>>
>> /home/rajika/projects/qpid/qpid/python:/home/rajika/projects/qpid/qpid/extras/qmf/src/py/
>>
>> Thanks for the help.
>> Rajika
>>
>>
>>>
>>> Here's mine ...
>>>
>>> $ echo $PYTHONPATH
>>>
>>> /home/jrobie/projects/qpid/python:/home/jrobie/projects/qpid/extras/qmf/src/py
>>>
>>> And it works for me.
>>>
>>> Jonathan
>>>
>>>
>>> ---------------------------------------------------------------------
>>> Apache Qpid - AMQP Messaging Implementation
>>> Project:      http://qpid.apache.org
>>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>>>
>>>
>>
>

Re: Configuring qpid-* python scripts

Posted by Rajika Kumarasiri <ra...@wso2.com>.
Do you see anything suspicious? I'll also upgrade to version 2.6.6 of Python
and see how it goes.

Rajika

On Wed, Dec 15, 2010 at 8:06 AM, Rajika Kumarasiri <ra...@wso2.com> wrote:

>
>
> On Wed, Dec 15, 2010 at 1:46 AM, Jonathan Robie <jonathan.robie@redhat.com
> > wrote:
>
>> What does your PYTHONPATH look like?
>>
>
> [rajika@localhost py]$ pwd
> /home/rajika/projects/qpid/qpid/tools/src/py
> [rajika@localhost py]$ echo $PYTHONPATH
>
> /home/rajika/projects/qpid/qpid/python:/home/rajika/projects/qpid/qpid/extras/qmf/src/py/
>
> Thanks for the help.
> Rajika
>
>
>>
>> Here's mine ...
>>
>> $ echo $PYTHONPATH
>>
>> /home/jrobie/projects/qpid/python:/home/jrobie/projects/qpid/extras/qmf/src/py
>>
>> And it works for me.
>>
>> Jonathan
>>
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project:      http://qpid.apache.org
>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>>
>>
>

Re: Configuring qpid-* python scripts

Posted by Rajika Kumarasiri <ra...@wso2.com>.
On Wed, Dec 15, 2010 at 1:46 AM, Jonathan Robie
<jo...@redhat.com>wrote:

> What does your PYTHONPATH look like?
>

[rajika@localhost py]$ pwd
/home/rajika/projects/qpid/qpid/tools/src/py
[rajika@localhost py]$ echo $PYTHONPATH
/home/rajika/projects/qpid/qpid/python:/home/rajika/projects/qpid/qpid/extras/qmf/src/py/

Thanks for the help.
Rajika


>
> Here's mine ...
>
> $ echo $PYTHONPATH
>
> /home/jrobie/projects/qpid/python:/home/jrobie/projects/qpid/extras/qmf/src/py
>
> And it works for me.
>
> Jonathan
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

Re: Configuring qpid-* python scripts

Posted by Jonathan Robie <jo...@redhat.com>.
What does your PYTHONPATH look like?

Here's mine ...

$ echo $PYTHONPATH
/home/jrobie/projects/qpid/python:/home/jrobie/projects/qpid/extras/qmf/src/py

And it works for me.

Jonathan

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Configuring qpid-* python scripts

Posted by Lahiru Gunathilake <gl...@gmail.com>.
Hi Rajika,

For me its 2.6.6 and works fine.

Lahiru

On Tue, Dec 14, 2010 at 10:01 PM, Rajika Kumarasiri <ra...@wso2.com> wrote:

> Python 2.6.1 (r261:67515, Apr 22 2009, 20:24:35)
> [GCC 3.4.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>>
>
>
> Rajika
>
> On Tue, Dec 14, 2010 at 5:48 PM, Gordon Sim <gs...@redhat.com> wrote:
>
> > On 12/14/2010 06:40 AM, Rajika Kumarasiri wrote:
> >
> >> Thanks. Now I am getting a different error.
> >>
> >> [rajika@localhost py]$ ./qpid-config --help
> >> Traceback (most recent call last):
> >>   File "./qpid-config", line 26, in<module>
> >>     from qmf.console import Session
> >>   File
> "/home/rajika/projects/qpid/qpid/extras/qmf/src/py/qmf/console.py",
> >> line 24, in<module>
> >>     import qpid
> >>   File "/home/rajika/projects/qpid/qpid/python/qpid/__init__.py", line
> 20,
> >> in<module>
> >>     import connection
> >>   File "/home/rajika/projects/qpid/qpid/python/qpid/connection.py", line
> >> 20,
> >> in<module>
> >>     import datatypes, session
> >>   File "/home/rajika/projects/qpid/qpid/python/qpid/session.py", line
> 21,
> >> in
> >> <module>
> >>     from generator import command_invoker
> >>   File "/home/rajika/projects/qpid/qpid/python/qpid/generator.py", line
> >> 22,
> >> in<module>
> >>     from ops import *
> >>   File "/home/rajika/projects/qpid/qpid/python/qpid/ops.py", line 20, in
> >> <module>
> >>     from util import fill
> >>   File "/home/rajika/projects/qpid/qpid/python/qpid/util.py", line 25,
> in
> >> <module>
> >>     from socket import ssl as wrap_socket
> >> ImportError: cannot import name ssl
> >>
> >
> > What version of python are you using?
> >
> >
> > ---------------------------------------------------------------------
> > Apache Qpid - AMQP Messaging Implementation
> > Project:      http://qpid.apache.org
> > Use/Interact: mailto:users-subscribe@qpid.apache.org
> >
> >
>

Re: Configuring qpid-* python scripts

Posted by Rajika Kumarasiri <ra...@wso2.com>.
Python 2.6.1 (r261:67515, Apr 22 2009, 20:24:35)
[GCC 3.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>


Rajika

On Tue, Dec 14, 2010 at 5:48 PM, Gordon Sim <gs...@redhat.com> wrote:

> On 12/14/2010 06:40 AM, Rajika Kumarasiri wrote:
>
>> Thanks. Now I am getting a different error.
>>
>> [rajika@localhost py]$ ./qpid-config --help
>> Traceback (most recent call last):
>>   File "./qpid-config", line 26, in<module>
>>     from qmf.console import Session
>>   File "/home/rajika/projects/qpid/qpid/extras/qmf/src/py/qmf/console.py",
>> line 24, in<module>
>>     import qpid
>>   File "/home/rajika/projects/qpid/qpid/python/qpid/__init__.py", line 20,
>> in<module>
>>     import connection
>>   File "/home/rajika/projects/qpid/qpid/python/qpid/connection.py", line
>> 20,
>> in<module>
>>     import datatypes, session
>>   File "/home/rajika/projects/qpid/qpid/python/qpid/session.py", line 21,
>> in
>> <module>
>>     from generator import command_invoker
>>   File "/home/rajika/projects/qpid/qpid/python/qpid/generator.py", line
>> 22,
>> in<module>
>>     from ops import *
>>   File "/home/rajika/projects/qpid/qpid/python/qpid/ops.py", line 20, in
>> <module>
>>     from util import fill
>>   File "/home/rajika/projects/qpid/qpid/python/qpid/util.py", line 25, in
>> <module>
>>     from socket import ssl as wrap_socket
>> ImportError: cannot import name ssl
>>
>
> What version of python are you using?
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

Re: Configuring qpid-* python scripts

Posted by Gordon Sim <gs...@redhat.com>.
On 12/14/2010 06:40 AM, Rajika Kumarasiri wrote:
> Thanks. Now I am getting a different error.
>
> [rajika@localhost py]$ ./qpid-config --help
> Traceback (most recent call last):
>    File "./qpid-config", line 26, in<module>
>      from qmf.console import Session
>    File "/home/rajika/projects/qpid/qpid/extras/qmf/src/py/qmf/console.py",
> line 24, in<module>
>      import qpid
>    File "/home/rajika/projects/qpid/qpid/python/qpid/__init__.py", line 20,
> in<module>
>      import connection
>    File "/home/rajika/projects/qpid/qpid/python/qpid/connection.py", line 20,
> in<module>
>      import datatypes, session
>    File "/home/rajika/projects/qpid/qpid/python/qpid/session.py", line 21, in
> <module>
>      from generator import command_invoker
>    File "/home/rajika/projects/qpid/qpid/python/qpid/generator.py", line 22,
> in<module>
>      from ops import *
>    File "/home/rajika/projects/qpid/qpid/python/qpid/ops.py", line 20, in
> <module>
>      from util import fill
>    File "/home/rajika/projects/qpid/qpid/python/qpid/util.py", line 25, in
> <module>
>      from socket import ssl as wrap_socket
> ImportError: cannot import name ssl

What version of python are you using?

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Configuring qpid-* python scripts

Posted by Rajika Kumarasiri <ra...@wso2.com>.
No Lahiru, that didn't help I am getting the same error still.

Rajika

On Tue, Dec 14, 2010 at 12:57 PM, Lahiru Gunathilake <gl...@gmail.com>wrote:

> Hi Rajika,
>
> Please run "python setup.py build" inside extras/qmf and tools directories,
> and try again.
>
> Lahiru
>
> On Tue, Dec 14, 2010 at 12:10 PM, Rajika Kumarasiri <ra...@wso2.com>
> wrote:
>
> > Yes, you need the QMF console module under 'extras', i.e. add
> > extras/qmf/src/py/qmf to your PYTHONPATH.
> >
> > Thanks. Now I am getting a different error.
> >
> > [rajika@localhost py]$ ./qpid-config --help
> > Traceback (most recent call last):
> >  File "./qpid-config", line 26, in <module>
> >    from qmf.console import Session
> >   File
> "/home/rajika/projects/qpid/qpid/extras/qmf/src/py/qmf/console.py",
> > line 24, in <module>
> >    import qpid
> >  File "/home/rajika/projects/qpid/qpid/python/qpid/__init__.py", line 20,
> > in <module>
> >    import connection
> >  File "/home/rajika/projects/qpid/qpid/python/qpid/connection.py", line
> 20,
> > in <module>
> >    import datatypes, session
> >  File "/home/rajika/projects/qpid/qpid/python/qpid/session.py", line 21,
> in
> > <module>
> >    from generator import command_invoker
> >  File "/home/rajika/projects/qpid/qpid/python/qpid/generator.py", line
> 22,
> > in <module>
> >    from ops import *
> >  File "/home/rajika/projects/qpid/qpid/python/qpid/ops.py", line 20, in
> > <module>
> >    from util import fill
> >  File "/home/rajika/projects/qpid/qpid/python/qpid/util.py", line 25, in
> > <module>
> >    from socket import ssl as wrap_socket
> > ImportError: cannot import name ssl
> >
> >
> > Rajika
> >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > Apache Qpid - AMQP Messaging Implementation
> > > Project:      http://qpid.apache.org
> > > Use/Interact: mailto:users-subscribe@qpid.apache.org
> > >
> > >
> >
>

Re: Configuring qpid-* python scripts

Posted by Lahiru Gunathilake <gl...@gmail.com>.
Hi Rajika,

Please run "python setup.py build" inside extras/qmf and tools directories,
and try again.

Lahiru

On Tue, Dec 14, 2010 at 12:10 PM, Rajika Kumarasiri <ra...@wso2.com> wrote:

> Yes, you need the QMF console module under 'extras', i.e. add
> extras/qmf/src/py/qmf to your PYTHONPATH.
>
> Thanks. Now I am getting a different error.
>
> [rajika@localhost py]$ ./qpid-config --help
> Traceback (most recent call last):
>  File "./qpid-config", line 26, in <module>
>    from qmf.console import Session
>   File "/home/rajika/projects/qpid/qpid/extras/qmf/src/py/qmf/console.py",
> line 24, in <module>
>    import qpid
>  File "/home/rajika/projects/qpid/qpid/python/qpid/__init__.py", line 20,
> in <module>
>    import connection
>  File "/home/rajika/projects/qpid/qpid/python/qpid/connection.py", line 20,
> in <module>
>    import datatypes, session
>  File "/home/rajika/projects/qpid/qpid/python/qpid/session.py", line 21, in
> <module>
>    from generator import command_invoker
>  File "/home/rajika/projects/qpid/qpid/python/qpid/generator.py", line 22,
> in <module>
>    from ops import *
>  File "/home/rajika/projects/qpid/qpid/python/qpid/ops.py", line 20, in
> <module>
>    from util import fill
>  File "/home/rajika/projects/qpid/qpid/python/qpid/util.py", line 25, in
> <module>
>    from socket import ssl as wrap_socket
> ImportError: cannot import name ssl
>
>
> Rajika
>
> >
> >
> > ---------------------------------------------------------------------
> > Apache Qpid - AMQP Messaging Implementation
> > Project:      http://qpid.apache.org
> > Use/Interact: mailto:users-subscribe@qpid.apache.org
> >
> >
>

Re: Configuring qpid-* python scripts

Posted by Rajika Kumarasiri <ra...@wso2.com>.
Yes, you need the QMF console module under 'extras', i.e. add
extras/qmf/src/py/qmf to your PYTHONPATH.

Thanks. Now I am getting a different error.

[rajika@localhost py]$ ./qpid-config --help
Traceback (most recent call last):
  File "./qpid-config", line 26, in <module>
    from qmf.console import Session
  File "/home/rajika/projects/qpid/qpid/extras/qmf/src/py/qmf/console.py",
line 24, in <module>
    import qpid
  File "/home/rajika/projects/qpid/qpid/python/qpid/__init__.py", line 20,
in <module>
    import connection
  File "/home/rajika/projects/qpid/qpid/python/qpid/connection.py", line 20,
in <module>
    import datatypes, session
  File "/home/rajika/projects/qpid/qpid/python/qpid/session.py", line 21, in
<module>
    from generator import command_invoker
  File "/home/rajika/projects/qpid/qpid/python/qpid/generator.py", line 22,
in <module>
    from ops import *
  File "/home/rajika/projects/qpid/qpid/python/qpid/ops.py", line 20, in
<module>
    from util import fill
  File "/home/rajika/projects/qpid/qpid/python/qpid/util.py", line 25, in
<module>
    from socket import ssl as wrap_socket
ImportError: cannot import name ssl


Rajika

>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

Re: Configuring qpid-* python scripts

Posted by Gordon Sim <gs...@redhat.com>.
On 12/13/2010 12:23 PM, Rajika Kumarasiri wrote:
> I was trying to set up python scripts to monitor the C++ broker. So I just
> got a checkout from the svn HEAD and build the python folder using python
> "python setup.py build" and set the environment varible PYTHONPATH to point
> to the python directory. Then I switch to the $PYTHONPATH/../tools/src/py
> and tried to execute -
>
> $python qpid-config --help, which ends up giving me the following error.
> Traceback (most recent call last):
>    File "qpid-config", line 26, in<module>
>      from qmf.console import Session
> ImportError: No module named qmf.console
>
>
> It seems that I am missing a python module but I can not locate where it is.
> Am I missing something ? Any help is appreciated.

Yes, you need the QMF console module under 'extras', i.e. add 
extras/qmf/src/py/qmf to your PYTHONPATH.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org