trouble with a pyya connection

View: New views
4 Messages — Rating Filter:   Alert me  

trouble with a pyya connection

by Jennifer Cranfill :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I'm new to openwfe, but very excited about the possibilities it
presents. I'm trying to setup a small python script that can connect
to openwfe, but I'm having trouble connecting.

Here is my script:
from openwfe.workitem import codec
from openwfe.workitem import StringAttribute
from openwfe.workitem import FlowExpressionId
from openwfe.rest.wlclient import WorkSession

workSession = WorkSession('localhost', 5080, 'bob', 'bob')


Here is the error I get:
Traceback (most recent call last):
  File "openwfe-example.py", line 10, in ?
    workSession = WorkSession('localhost', 5080, 'bob', 'bob')
  File "/shots/spi/tas/src/bright/workflow/openwfe-python-1.7.2-src/
openwfe/rest/wlclient/__init__.py", line 65, in __init__
    self.sessionId = getSession(self.url, username, password)
  File "/shots/spi/tas/src/bright/workflow/openwfe-python-1.7.2-src/
openwfe/rest/__init__.py", line 151, in getSession
    f = urlopen(request)
  File "/usr/local/lib/python2.4/urllib2.py", line 130, in urlopen
    return _opener.open(url, data)
  File "/usr/local/lib/python2.4/urllib2.py", line 364, in open
    response = meth(req, response)
  File "/usr/local/lib/python2.4/urllib2.py", line 471, in
http_response
    response = self.parent.error(
  File "/usr/local/lib/python2.4/urllib2.py", line 402, in error
    return self._call_chain(*args)
  File "/usr/local/lib/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python2.4/urllib2.py", line 480, in
http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 500: Server Error

I have a fairly standard install, was there something I needed to
start before trying to connect with python? the webclient is working.
Any help would be greatly appreciated. Thanks!

--Jennifer


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "OpenWFE users" group.
To post to this group, send email to openwfe-users@...
To unsubscribe from this group, send email to openwfe-users-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/openwfe-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: trouble with a pyya connection

by John Mettraux :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Jennifer,

2007/5/2, Jennifer Cranfill <jenalias@...>:

>
> I'm new to openwfe, but very excited about the possibilities it
> presents. I'm trying to setup a small python script that can connect
> to openwfe, but I'm having trouble connecting.
>
> Here is my script:
> from openwfe.workitem import codec
> from openwfe.workitem import StringAttribute
> from openwfe.workitem import FlowExpressionId
> from openwfe.rest.wlclient import WorkSession
>
> workSession = WorkSession('localhost', 5080, 'bob', 'bob')
>
>
> Here is the error I get:
> Traceback (most recent call last):
>   File "openwfe-example.py", line 10, in ?
>     workSession = WorkSession('localhost', 5080, 'bob', 'bob')
>   File "/shots/spi/tas/src/bright/workflow/openwfe-python-1.7.2-src/
> openwfe/rest/wlclient/__init__.py", line 65, in __init__
>     self.sessionId = getSession(self.url, username, password)
>   File "/shots/spi/tas/src/bright/workflow/openwfe-python-1.7.2-src/
> openwfe/rest/__init__.py", line 151, in getSession
>     f = urlopen(request)
>   File "/usr/local/lib/python2.4/urllib2.py", line 130, in urlopen
>     return _opener.open(url, data)
>   File "/usr/local/lib/python2.4/urllib2.py", line 364, in open
>     response = meth(req, response)
>   File "/usr/local/lib/python2.4/urllib2.py", line 471, in
> http_response
>     response = self.parent.error(
>   File "/usr/local/lib/python2.4/urllib2.py", line 402, in error
>     return self._call_chain(*args)
>   File "/usr/local/lib/python2.4/urllib2.py", line 337, in _call_chain
>     result = func(*args)
>   File "/usr/local/lib/python2.4/urllib2.py", line 480, in
> http_error_default
>     raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
> urllib2.HTTPError: HTTP Error 500: Server Error
>
> I have a fairly standard install, was there something I needed to
> start before trying to connect with python? the webclient is working.
> Any help would be greatly appreciated. Thanks!

The root error should be listed in logs/worklist.log. There should be
an exception stack trace there stating what's going wrong.

I don't know if you work in a Python-only shop, but have you checked
OpenWFEru (http://openwferu.rubyforge.org) ? OpenWFE main effort has
switched from Java to there.


Best regards,

--
John Mettraux   -///-   http://jmettraux.openwfe.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "OpenWFE users" group.
To post to this group, send email to openwfe-users@...
To unsubscribe from this group, send email to openwfe-users-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/openwfe-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: trouble with a pyya connection

by Jennifer Cranfill :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On May 1, 11:05 pm, "John Mettraux" <jmettr...@...> wrote:

> The root error should be listed in logs/worklist.log. There should be
> an exception stack trace there stating what's going wrong.

Thanks for your quick response! Looks like the problem was that I had
http_proxy environment variables set.

> I don't know if you work in a Python-only shop, but have you checked
> OpenWFEru (http://openwferu.rubyforge.org) ? OpenWFE main effort has
> switched from Java to there.

Interesting... I was planning on using python to automate a lot of the
processes. Are pyyas supported with openwferu?

Thanks!

--Jennifer


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "OpenWFE users" group.
To post to this group, send email to openwfe-users@...
To unsubscribe from this group, send email to openwfe-users-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/openwfe-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: trouble with a pyya connection

by John Mettraux :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Jennifer,

2007/5/3, Jennifer Cranfill <jenalias@...>:
>
>
> On May 1, 11:05 pm, "John Mettraux" <jmettr...@...> wrote:
>
> > The root error should be listed in logs/worklist.log. There should be
> > an exception stack trace there stating what's going wrong.
>
> Thanks for your quick response! Looks like the problem was that I had
> http_proxy environment variables set.

Ah, well done.

> > I don't know if you work in a Python-only shop, but have you checked
> > OpenWFEru (http://openwferu.rubyforge.org) ? OpenWFE main effort has
> > switched from Java to there.
>
> Interesting... I was planning on using python to automate a lot of the
> processes. Are pyyas supported with openwferu?

There are currently two approaches :

1).
Scott Stults is currently working on a port of OpenWFEru to Python.
But I don't know anything about the status of his work.
http://jmettraux.wordpress.com/2007/04/27/from-ruby-to-python/

Maybe that could be of interest for you.

2).
I'm currently working on adding the original OpenWFE REST interface to
OpenWFEru. It's an important step because of those already existing
(and used) python, perl and .net interfaces.

I hope to come up with something next week.

I'll certainly develop a simpler, more mature REST interface specially
for OpenWFEru after that initial port work. This newer REST interface
will certainly sport serialization to XML and to YAML / JSON.


Best regards,

--
John Mettraux   -///-   http://jmettraux.openwfe.org


(copy to OpenWFEru-dev)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "OpenWFE users" group.
To post to this group, send email to openwfe-users@...
To unsubscribe from this group, send email to openwfe-users-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/openwfe-users?hl=en
-~----------~----~----~----~------~----~------~--~---

LightInTheBox - Buy quality products at wholesale price!