patch: small crash fix for python 2.0.0rc2 library (fwd)
Ryan Barrett
openid at ryanb.org
Fri Sep 7 09:43:19 PDT 2007
On Thu, 6 Sep 2007, Kevin Turner wrote:
> How is this being triggered? Under what conditions are empty URL parameters
> valid input to this function? And presumably by "empty" you do not mean the
> empty string, but None? The documentation specifies a type of {str: str},
> and I'm trying to determine if there's a compelling case for None to be
> valid input at all.
sure, that's reasonable. if you leave it as is, though, you'll need to change
its callers to check for None URL params. that's probably more trouble than
making appendArgs handle them gracefully.
anyway, here's the warning message and stacktrace i saw, if it helps:
seqToKV warning: Converting value to string: None: [('assoc_handle', u'{HMAC-SHA1}{46dfc90e}{RvtCKg==}'), ('ext0.fullname', 'Ryan Barrett'), ('ext0.nickname', 'ryan'), ('identity', 'http://localhost/openid'), ('mode', 'id_res'), ('ns.ext0', 'http://openid.net/sreg/1.0'), ('op_endpoint',None), ('response_nonce', '2007-09-06T09:35:29ZouYrBe'), ('return_to', 'http://localhost:8001/process?janrain_nonce=2007-09-06T09%3A33%3A54ZzKLx6R'), ('signed', 'assoc_handle,ext0.fullname,ext0.nickname,identity,mode,ns.ext0,op_endpoint,response_nonce,return_to,signed')]
Traceback (most recent call last):
File "wsgiref/handlers.py", line 92, in run
File "/home/ryanb/pyblosxom-svn/pyblosxom/Pyblosxom/pyblosxom.py", line 480, in __call__
p.run()
File "/home/ryanb/pyblosxom-svn/pyblosxom/Pyblosxom/pyblosxom.py", line 194, in run
donefunc=lambda x:x)
File "/home/ryanb/pyblosxom-svn/pyblosxom/Pyblosxom/tools.py", line 754, in run_callback
output = func(input)
File "/home/ryanb/src/pyblosxom/plugins/openid_server.py", line 287, in cb_handle
return respond(request, oidrequest.answer(True))
File "/home/ryanb/src/pyblosxom/plugins/openid_server.py", line 183, in respond
webresponse = oidserver.encodeResponse(oidresponse)
File "/home/ryanb/src/pyblosxom/plugins/openid_libs_2.zip/openid/server/server.py", line 1464, in encodeResponse
return self.encoder.encode(response)
File "/home/ryanb/src/pyblosxom/plugins/openid_libs_2.zip/openid/server/server.py", line 1232, in encode
return super(SigningEncoder, self).encode(response)
File "/home/ryanb/src/pyblosxom/plugins/openid_libs_2.zip/openid/server/server.py", line 1188, in encode
location = response.encodeToURL()
File "/home/ryanb/src/pyblosxom/plugins/openid_libs_2.zip/openid/server/server.py", line 930, in encodeToURL
return self.fields.toURL(self.request.return_to)
File "/home/ryanb/src/pyblosxom/plugins/openid_libs_2.zip/openid/message.py", line 324, in toURL
return oidutil.appendArgs(base_url, self.toPostArgs())
File "/home/ryanb/src/pyblosxom/plugins/openid_libs_2.zip/openid/oidutil.py", line 107, in appendArgs
v = v.encode('UTF-8')
AttributeError: 'NoneType' object has no attribute 'encode'
-Ryan
--
http://snarfed.org/
More information about the Dev
mailing list