Re: [Snowy] Crash when doing PUT



On Fri, Aug 7, 2009 at 12:25 PM, Cornelius Hald<hald icandy de> wrote:
> On Fri, 2009-08-07 at 08:37 -0700, Sandy Armstrong wrote:
>> Both ways *should* be acceptable, but I've only tested using the
>> Authorization header.
>
> I changed my code and I'm now using the Authorization header.
> Unfortunately the response is still the same :(
>
> Also I upgraded Django to the latest SVN version, but still the same. It

We need to update our instructions.  What Snowy requires is Django
1.1, which has finally been released.  You no longer need latest SVN
(though your distro might not have 1.1 packaged yet).

> would be nice if someone could tell me what the error message means or
> where it comes from.
> Maybe someone could send me the wireshark output of a successful
> conversation between Tomboy and Snowy. One where Tomboy is putting new
> notes onto Snowy. I'm having troubles installing the latest Tomboy,
> otherwise I would do it myself...

Head over to tomboy-list and I can help you with that.

> Below is the new conversation. This time with the OAuth stuff in the
> headers. Please have a close look at my request. I'm new to OAuth, REST,
> etc. so maybe I'm just making some stupid mistake.

Are you doing the complete OAuth auth process?  You know, visiting the
website to authorize access, etc etc.

> PUT /api/1.0/root/notes/ HTTP/1.1
> User-Agent: liboauth-agent
> Host: 127.0.0.1:8000
> Accept: */*
> Content-Type: application/json
> Authorization: OAuth realm="Snowy", oauth_consumer_key="root",

Did you add this "root" consumer key in the Snowy database?

Just FYI, latest Tomboy git requires 1234567/abcdefg as the key/secret
pair...but we are changing that soon to a common key/secret pair that
all consumers should use (I think we decided on anyone/anyone).

> oauth_nonce="fZAvBxnjo39y8WxxH3qjDZ4z",
> oauth_signature_method="HMAC-SHA1", oauth_timestamp="1249672347",
> oauth_token="4uUnR6tgGMbQynNP2A", oauth_version="1.0",
> oauth_signature="ynOE1r7Co%2FqX1Hevo1H64z2LQ4I%3D"
> 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 }

Well I don't think this would work.  The first sync you do,
latest-sync-revision should be 0, not -1 (when PUTing to the Notes
resource, you are specifying what you think the latest-sync-revision
value should be when the PUT is complete).

> HTTP/1.0 400 BAD REQUEST
> Date: Fri, 07 Aug 2009 19:12:27 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.2 pre-alpha) crash report:
>
> Method signature does not match.
>
> Resource does not expect any parameters.
>
> Exception was: cannot concatenate 'str' and 'int' objects

I have no idea what this would be, to be honest.

I think you should verify that things are working as expected by
running latest Tomboy and Snowy from git, and performing a few
successful syncs.

Sandy


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]