On Tue, Dec 07, 2010 at 07:37:41PM -0800, Don Albrecht wrote:
>
> I've successfully connected most of my application to ruote-kit
> (retrieving & initing processeses) but am having a hard time advancing
> work items.
>
> When I attempt to post:
> Sinatra::RespondTo::UnhandledFormat:
> Sinatra::RespondTo::UnhandledFormat
> results
>
> Here's the python code I'm using to connect
>
> data = {}
> data["_proceed"] = "on"
> #data["format"] = "json"
> data["method"] = "put"
> print( request.POST )
> data['fields'] = simplejson.dumps( request.POST if
> hasattr(request, "POST") else {} )
> print( data )
> data = urllib.urlencode( data )
> print( "http://localhost:9292/_ruote/workitems/" + taskid )
>
> req = urllib2.Request("http://localhost:9292/_ruote/workitems/" +
> taskid + ".json", data, {'accept ': 'application/json'} )
Hello and welcome to the ruote mailing list,
maybe :
---8<---
req = urllib2.Request("http://localhost:9292/_ruote/workitems/" + taskid +
".json", data, {'Accept': 'application/json'} )
--->8---
or simply
---8<---
req = urllib2.Request("http://localhost:9292/_ruote/workitems/" + taskid,
data, {'Accept': 'application/json'} )
--->8---
I'd like to reproduce that, can I simply use the script as you've pasted it
with any Python ? I have SnowLeopard default 2.6.
If I try to run
https://gist.github.com/732859
it says
---8<---
jmettr...@sanma ~/w/ruote-kit (master) 〒 python t.py
Traceback (most recent call last):
File "t.py", line 6, in <module>
print( request.POST )
NameError: name 'request' is not defined
--->8---
Thanks in advance,
--
John Mettraux - http://jmettraux.wordpress.com
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en