Re: [Snowy] Snowy won't sync with Tomboy or Conboy after upgrade to Ubuntu 11.04 on server



Hello all,

I found following link.

http://stackoverflow.com/questions/4341206/requesting-token-via-django-piston-throws-typeerror-exception

so. I changed lib/piston/store.py like this.

== lib/piston/store.py BEGIN ==
    def lookup_consumer(self, key):
        try:
            self.consumer = Consumer.objects.get(key=key)
+            self.consumer.key = self.consumer.key.encode('ascii')
+           self.consumer.secret = self.consumer.secret.encode('ascii')
            return self.consumer
        except Consumer.DoesNotExist:
            return None

    def lookup_token(self, token_type, token):
        if token_type == 'request':
            token_type = Token.REQUEST
        elif token_type == 'access':
            token_type = Token.ACCESS
        try:
            self.request_token = Token.objects.get(key=token,
                                                   token_type=token_type)
+            self.request_token.key = self.request_token.key.encode('ascii')
+            self.request_token.secret = self.request_token.secret.encode('ascii')
            return self.request_token
        except Token.DoesNotExist:
            return None
== lib/piston/store.py END ==

and It works now.

2011-05-08 오후 5:43, Blaise Alleyne 쓴 글:
Hello all,

I was happily running Snowy on an Ubuntu machine in my living room, syncing with Tomboy on my Ubuntu laptop and Conboy on my Nokia N900. Since upgrading the Snowy Ubuntu machine from 10.10 to 11.04, I've been unable to sync (from my N900, or from my laptop, before and after the laptop went through the same upgrade).

I'd noticed this Python 2.7 related bug https://bugzilla.gnome.org/show_bug.cgi?id=638480 (via: http://mail.gnome.org/archives/snowy-list/2011-January/msg00004.html), but I'm not sure if it's the same or a related issue.

Any help appreciated, as I was finding Snowy sync quite useful and using it regularly...


I have the latest Snowy from git running on Ubuntu 11.04 (Python 2.7 / Django 1.2.5).



== Conboy ==
I haven't changed my Conboy settings at all, and was using it regularly (sometimes multiple times a day) to sync for the past several months.

After clicking Synchronize from the main menu, an error message appears shortly saying:
"Error Message: Got no api_ref. Please check that your local time is set correctly."


(Note: local time is still the same on both mobile and snowy.haise.ca)

The stack trace when running Conboy from the terminal shows a Django error, which, using the apache logs on my web server, looks very similar to the one from Bug #638480: http://pyther.net/a/tomboy_snowy_error.html -- "character mapping must return integer, None or unicode" -- that error appears at both /api/1.0/ and /oauth/request_token/ (with the oauth information in the query string), though only the /api/1.0/ request shows in the Apache logs (I can replicate the /oauth/request_token/ error by visiting that URL with the oauth query string from the apache logs though).


Apache log said:
206.248.136.28 - - [08/May/2011:04:23:54 -0400] "GET /api/1.0/?oauth_consumer_key=anyone&oauth_nonce=REDACTED&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1304843033&oauth_token=REDACTED&oauth_version=1.0&oauth_signature=REDACTED HTTP/1.0" 500 100840 "-" "-"


== Tomboy (laptop) ==
When I click 'Synchronize' inside Tomboy, I get an error:
"Failed to synchronize
Could not synchronize notes. Check the details below and try again."

There are no details given.

Debug output to the terminal:
"""
[ERROR 04:21:01.499] Caught exception. Message: The remote server returned an error: (500) INTERNAL SERVER ERROR.
[ERROR 04:21:01.530] Stack trace for previous exception:   at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x00000] in<filename unknown>:0
   at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00000] in<filename unknown>:0
[ERROR 04:21:01.531] Rest of stack trace for above exception:    at System.Environment.get_StackTrace()
    at Tomboy.WebSync.Api.OAuth.MakeWebRequest(RequestMethod method, System.String url, System.Collections.Generic.List`1 parameters, System.String postData)
    at Tomboy.WebSync.Api.OAuth.WebRequest(RequestMethod method, System.String url, System.String postData)
    at Tomboy.WebSync.Api.OAuth.Get(System.String uri, IDictionary`2 queryParameters)
    at Tomboy.WebSync.Api.RootInfo.GetRoot(System.String rootUri, IWebConnection connection)
    at Tomboy.WebSync.WebSyncServer.BeginSyncTransaction()
    at Tomboy.Sync.SyncManager.SynchronizationThread()
[ERROR 04:21:01.532] Synchronization failed with the following exception: The remote server returned an error: (500) INTERNAL SERVER ERROR.
   at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x00000] in<filename unknown>:0
   at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00000] in<filename unknown>:0

(Tomboy:18758): GLib-CRITICAL **: g_source_remove: assertion `tag>  0' failed
"""


Apache log just says:
206.248.136.28 - - [08/May/2011:04:21:01 -0400] "GET /api/1.0/ HTTP/1.1" 500 98052 "-" "-"



== Another Tomboy ==
Now, I'd tried to rework my Tomboy settings with my laptop to see if I could get it to reauthenticate, then tried to restore them from a gconf backup... so, just in case there was something wrong above, I've tried in another instance of Tomboy as well (from the same machine as Snowy is running on, actually). These settings have not been modified at all since initially set up.

"Failed to synchronize
Could not synchronize notes. Check the details below and try again."

Tomboy:
[ERROR 04:30:59.471] Caught exception. Message: The remote server returned an error: (500) INTERNAL SERVER ERROR.
[ERROR 04:30:59.471] Stack trace for previous exception:   at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x00000] in<filename unknown>:0
   at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00000] in<filename unknown>:0
[ERROR 04:30:59.471] Rest of stack trace for above exception:    at System.Environment.get_StackTrace()
    at Tomboy.WebSync.Api.OAuth.MakeWebRequest(RequestMethod method, System.String url, System.Collections.Generic.List`1 parameters, System.String postData)
    at Tomboy.WebSync.Api.OAuth.WebRequest(RequestMethod method, System.String url, System.String postData)
    at Tomboy.WebSync.Api.OAuth.Get(System.String uri, IDictionary`2 queryParameters)
    at Tomboy.WebSync.Api.RootInfo.GetRoot(System.String rootUri, IWebConnection connection)
    at Tomboy.WebSync.WebSyncServer.BeginSyncTransaction()
    at Tomboy.Sync.SyncManager.SynchronizationThread()
[ERROR 04:30:59.471] Synchronization failed with the following exception: The remote server returned an error: (500) INTERNAL SERVER ERROR.
   at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x00000] in<filename unknown>:0
   at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00000] in<filename unknown>:0

(Tomboy:25462): GLib-CRITICAL **: g_source_remove: assertion `tag>  0' failed


Apache:
206.248.136.28 - - [08/May/2011:04:30:59 -0400] "GET /api/1.0/ HTTP/1.1" 500 97666 "-" "-"



== Browser ==
Not sure what's relevant to check here. If I visit the URLs from the Apache logs with the 500 errors, I can see the Django errors in my browser.

If I visit in Firefox, while logged into Snowy, I get....

{
     "oauth_access_token_url": "http://snowy.haise.ca/oauth/access_token/";,
     "api-version": "1.0",
     "oauth_request_token_url": "http://snowy.haise.ca/oauth/request_token/";,
     "oauth_authorize_url": "http://snowy.haise.ca/oauth/authenticate/";,
     "user-ref": {
         "href": "http://snowy.haise.ca/balleyne/";,
         "api-ref": "http://snowy.haise.ca/api/1.0/balleyne/";
     }
}






Let me know if there's other information that could be relevant.


Thanks,
Blaise Alleyne
_______________________________________________
snowy-list mailing list
snowy-list gnome org
http://mail.gnome.org/mailman/listinfo/snowy-list



--
보안컨설팅팀 과장 김 덕곤(Deoggon Kim)
Cellphone: +82 (10) 5663-2546
mailto:dgkim dgkim net
mailto:comy01 gmail com
jabber:dgkim dgkim net
http://www.dgkim.net/
http://twitter.com/deoggonkim
http://www.facebook.com/profile.php?id=100001160119988

(주)데이타뱅크시스템즈
705-701 대구광역시 남구 대명3동 2139-12번지 대구디지털산업진흥원 505호
http://www.idatabank.com/
Telephone: +82 (53) 746-5817
Facsimile: +82 (53) 746-5815

Please visit my sites.

begin:vcard
fn;quoted-printable:=EA=B9=80 =EB=8D=95=EA=B3=A4
n;quoted-printable;quoted-printable:=EA=B9=80;=EB=8D=95=EA=B3=A4
org;quoted-printable;quoted-printable:(=EC=A3=BC)=EB=8D=B0=EC=9D=B4=ED=83=80=EB=B1=85=ED=81=AC=EC=8B=9C=EC=8A=A4=
	=ED=85=9C=EC=A6=88;=EC=BB=A8=EC=84=A4=ED=8C=85=EC=82=AC=EC=97=85=EB=B3=B8=EB=B6=80 =EB=B3=B4=
	=EC=95=88=EC=BB=A8=EC=84=A4=ED=8C=85=ED=8C=80
adr;quoted-printable;quoted-printable;quoted-printable;quoted-printable:=EB=8C=80=EA=B5=AC=EB=94=94=EC=A7=80=ED=84=B8=EC=82=B0=EC=97=85=EC=A7=84=ED=
	=9D=A5=EC=9B=90 =EB=B3=B8=EA=B4=80 505=ED=98=B8;;=EB=8C=80=EB=AA=853=EB=8F=99 2139-12=EB=B2=88=EC=A7=80;=EB=82=A8=EA=B5=AC;=EB=8C=80=EA=B5=AC=EA=B4=91=EC=97=AD=EC=8B=9C;705-701;Republic of Korea
email;internet:dgkim dgkim net
title;quoted-printable:=EA=B3=BC=EC=9E=A5
tel;work:+82 (53) 746-5817
tel;fax:+82 (53) 746-5815
tel;cell:+82 (10) 5663-2546
url:http://www.idatabank.com/
version:2.1
end:vcard



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