Re: [Snowy] Crash when doing PUT
- From: Cornelius Hald <hald icandy de>
- To: Benoit Garret <benoit garret_gnome gadz org>
- Cc: snowy-list gnome org
- Subject: Re: [Snowy] Crash when doing PUT
- Date: Fri, 07 Aug 2009 17:18:15 +0200
On Fri, 2009-08-07 at 13:57 +0200, Benoit Garret wrote:
> I had the same error, installing python-simplejson should fix it
> instead of having to upgrade the whole python stack.
That helped a lot, thanks Benoit. After installing python-simlejson the
crash was gone and I received a simple "Bad Request" message. It turned
out that I had some mistakes (typos) in my json keys. I found out about
that by adding some debug output to api/handlers.py.
Unfortunately after fixing that I'm getting the next "Bad Request"
response. This time with some more information, but I'm having troubles
debugging that, because the problems seems to be in a different thread.
The execution of api/handlers.py is just terminated without that I can
find a reason.
Again any hints, tips and tricks would be very helpful :)
The reply I get is this:
Piston/0.2 (Django 1.1 beta 1) crash report:
Method signature does not match.
Resource does not expect any parameters.
Exception was: cannot concatenate 'str' and 'int' objects
For me it somehow sound like Snowy has problems that the OAuth
parameters are part of the URI. Could that be? Do I have to put the
OAuth parameters into the "Authorization" header? I know that the header
is the recommended way, but putting them into the URI should ok too.
Maybe it's something completely different. The complete communication is
below.
Thanks!
Conny
PUT /api/1.0/root/notes/?oauth_consumer_key=root&oauth_nonce=Ajrbnh6tAPe0_V5H68NV&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1249656916&oauth_token=4uUnR6tgGMbQynNP2A&oauth_version=1.0&oauth_signature=Jimtmt%2Fu4oUDFM0AOrC0Vi61rrY%3D HTTP/1.1
User-Agent: liboauth-agent
Host: 127.0.0.1:8000
Accept: */*
Content-Type: application/json
Content-Length: 425
{ "note-changes" : [ { "note-content" : "One line of content",
"pinned" : false, "last-meta-data-change-date" :
"2009-08-07T10:00:45.0000000+02:00", "guid" :
"4621178a-5c4a-4d2f-a473-1bff040ea575", "create-date" :
"2009-08-07T10:00:32.0000000+02:00", "open-on-startup" : false,
"note-content-version" : 0.1, "last-change-date" :
"2009-08-07T10:00:45.0000000+02:00", "title" : "New Note 123" } ],
"latest-sync-revision" : -1 }HTTP/1.0
400 BAD REQUEST
Date: Fri, 07 Aug 2009 14:55:16 GMT
Server: WSGIServer/0.1 Python/2.5.2
Vary: Authorization, Accept-Language, Cookie
Content-Type: text/html; charset=utf-8
Content-Language: en-us
Piston/0.2 (Django 1.1 beta 1) crash report:
Method signature does not match.
Resource does not expect any parameters.
Exception was: cannot concatenate 'str' and 'int' objects
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]