对于我正在处理的应用程序,我遇到了webopenid模块的问题。
到目前为止的代码是:
import web
from web import template, webopenid
from cms import database
urls = (
"/", "index",
"/openid", "webopenid.host"
)
render = template.render("templates", base="base")
class index():
def GET(self):
oid = webopenid.status()
if not oid:
form = webopenid.form("/openid")
return render.account_login(form)
else:
return render.account_home
app = web.application(urls, globals())
if __name__ == "__main__":
app.run()
当我尝试提交登录信息时(以https://openid.domain.com/user的形式),我会看到:
<type 'exceptions.ValueError'> at /openid
need more than 1 value to unpack
Python /Library/Python/2.6/site-packages/web.py-0.36-py2.6.egg/web/application.py in _match, line 415
Web POST http://account.dev.s92.org:8080/openid
我已经检查了其他webopenid用法的例子,这表明我的代码很好 - 任何想法可能是什么问题?