Open GoogleCodeExporter opened 8 years ago
I had a similar problem using the OAuth2WebServerFlow manually, and the
redirecting to flow.step1_get_authorize_url()
A work around for me was to use str(flow.step1_get_authorize_url()).
Ie. force conversion to str instead of unicode string as this is what webapp2
complains about.
It might be that webapp2 should be patched to handle unicode urls, I'm not
sure. But in any event it should be relatively easy to add some str() into the
methods on OAuth2WebServerFlow that generates URLs.
Ie. wrap with str() before return on line 1234 in oauth2client/client.py
Original comment by jopsen@gmail.com
on 11 Apr 2013 at 7:39
Thanks for the feedback! (un?)fortunately after a system reinstall/upgrade I am
no longer able to reproduce my problem, so I won't be able to try the proposed
solution. Please mark as closed, I'll re-open if needed.
Original comment by ronan.jo...@gmail.com
on 30 Apr 2013 at 10:29
[deleted comment]
Jonas, the problem resurfaced after I don't know what :-/ . I'm trying to
follow your suggestion ("to add some str() into the methods on
OAuth2WebServerFlow that generates URLs. Ie. wrap with str() before return on
line 1234 in oauth2client/client.py"). And note: as of today's GAE 1.8.0, the
line we are referring to is now line 830 in oauth2client/client.py: return
urlparse.urlunparse(parts)
How am I supposed to implement that? I agree that I can modify the file on my
local machine where I installed GAE, but once deployed it will be Google's GAE
that will be used, right? How can I override it? (and sorry for the newbie
question)
Original comment by ronan.jo...@gmail.com
on 28 May 2013 at 2:58
Adding a str() fixes the problem, but not the root cause. I spent hours trying
to figure out why one particular redirect raised this error while others
didn't, before noticing that the URL for the bad redirect was missing the
initial "/".
I have no idea *why* this is the case - possibly an incomplete path is
processed differently from a complete one. But if you hit this error try
changing:
self.redirect('home.view')
to:
self.redirect('/home.view')
Original comment by g...@vig.co.nz
on 9 Apr 2014 at 5:39
Original issue reported on code.google.com by
ronan.jo...@gmail.com
on 24 Mar 2013 at 8:54