Please open a ticket on googlecode. On Monday, 10 September 2012 07:31:04 UTC-5, peter wrote: > > Massimo I am testing this > > def test_dropbox(): > from dropbox_account import DropboxAccount > dropbox=DropboxAccount(request,key="XXXXXXX",secret="XXXXXXX") > dropbox.login_form() > return dict() > > I tried the above > > I get > > TRACEBACK > > 1. > 2. > 3. > 4. > 5. > 6. > 7. > 8. > 9. > > Traceback (most recent call last): > File "C:\Users\Peter\web2pyn\gluon\main.py", line 528, in wsgibase > session._try_store_on_disk(request, response) > File "C:\Users\Peter\web2pyn\gluon\globals.py", line 594, in > _try_store_on_disk > cPickle.dump(dict(self), response.session_file) > File "C:\Python26\lib\copy_reg.py", line 77, in _reduce_ex > raise TypeError("a class that defines __slots__ without " > TypeError: a class that defines __slots__ without defining __getstate__ > cannot be pickled > > On tracing the code it executes > > def login_form(self): > token = self.sess.obtain_request_token() > current.session.dropbox_token = token > dropbox_url = self.sess.build_authorize_url(token,self.login_url) > and blows out on > redirect(dropbox_url) > > dropbox_url is contains the correct url > > Peter > > > On Monday, 9 April 2012 22:34:31 UTC+1, Massimo Di Pierro wrote: >> >> Perhaps this can be useful: >> >> https://github.com/web2py/web2py/blob/master/gluon/contrib/login_methods/dropbox_account.py#L90 >> >> has been there for a while but I am not sure anybody has tested it very >> well. >> >> massimo >> >> On Monday, 9 April 2012 09:14:56 UTC-5, Paul Gerrard wrote: >>> >>> Hi, >>> >>> I got distracted by other things and only just came back to this. The >>> problem I was having was in my code was the token was 'disabled or >>> invalid'. I'm sure this is resolved by using the callback in the redirect >>> back from the Dropbox site. I commented out the code that's not relevant >>> for me in your code and it works fine now. >>> >>> As for using cron - I expect you could skip the redirect and go from >>> line 191 directly to 204. Presumably you need a try/except around 204? >>> >>> Paul. >>> >>> On Thursday, 5 January 2012 17:28:41 UTC, Joseph Jude wrote: >>>> >>>> If anyone is interested, you can look into the code for dropbox >>>> connection here: >>>> >>>> http://goo.gl/QYT2y >>>> >>>> This is my default.py. Look at dropbox_connect and process_dropbox. >>>> >>>> Question: How can I automate this with cron? When I do it, it stops >>>> with the redirect. >>>> >>>> Thank you, >>>> Joseph >>>> >>>
--