Yes, I just figured that out this morning. Adding urllib.urlencode (resetoptions) fixed the problem. I don't know if it's just me, but I didn't find it obvious that that was necessary.
Blair On Jun 30, 7:39 pm, "Nick Johnson (Google)" <nick.john...@google.com> wrote: > Hi Blair, > > Can you please include the code you're using to call the URLFetch > service? At a guess, I'd say you're trying to pass a dict as the body > of the request, rather than a string, but I can't tell without seeing > the source. > > -Nick Johnson > > 2009/6/28 Blair <shi...@gmail.com>: > > > > > > > Hi all > > > I'm getting this error every time I try to run this particular fetch > > call. In the development environment I get "TypeError: sendall() > > argument 1 must be string or read-only buffer, not dict" instead. > > Fetch is working fine with GET's elsewhere in the app without an > > issue. Any ideas as to what I'm doing wrong? > > > fromstring() argument 1 must be string or read-only buffer, not dict > > Traceback (most recent call last): > > File "/base/python_lib/versions/1/google/appengine/ext/webapp/ > > __init__.py", line 501, in __call__ > > handler.get(*groups) > > File "/base/data/home/apps/farcryupdateapp/1.334515093861420580/ > > updateapp.py", line 321, in get > > result = fetch(url=thisapplication.url+"index.cfm? > > type=UpdateApp&view=displayTypeReset&ajaxmode=true", > > payload=resetoptions, method=POST, deadline=25) > > File "/base/python_lib/versions/1/google/appengine/api/urlfetch.py", > > line 240, in fetch > > allow_truncated, follow_redirects) > > File "/base/python_lib/versions/1/google/appengine/api/urlfetch.py", > > line 290, in make_fetch_call > > rpc.make_call('Fetch', request, response, _get_fetch_result, > > allow_truncated) > > File "/base/python_lib/versions/1/google/appengine/api/ > > apiproxy_stub_map.py", line 389, in make_call > > self.__rpc.MakeCall(self.__service, method, request, response) > > File "/base/python_lib/versions/1/google/appengine/api/ > > apiproxy_rpc.py", line 92, in MakeCall > > self._MakeCallImpl() > > File "/base/python_lib/versions/1/google/appengine/runtime/ > > apiproxy.py", line 124, in _MakeCallImpl > > self.request.Output(e) > > File "/base/python_lib/versions/1/google/net/proto/ > > ProtocolBuffer.py", line 163, in Output > > self.OutputUnchecked(e) > > File "/base/python_lib/versions/1/google/appengine/api/ > > urlfetch_service_pb.py", line 1599, in > > OutputUnchecked > > out.putPrefixedString(self.payload_) > > File "/base/python_lib/versions/1/google/net/proto/ > > ProtocolBuffer.py", line 366, in putPrefixedString > > self.buf.fromstring(v) > > > Any help appreciated. > > > Blair > > -- > Nick Johnson, App Engine Developer Programs Engineer > Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration > Number: 368047 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---