V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
gujiaxi
V2EX  ›  Project Babel

升级PB,出现了几个问题……

  •  
  •   gujiaxi · 2012-04-17 17:30:37 +08:00 · 4879 次点击
    这是一个创建于 4363 天前的主题,其中的信息可能已经有所发展或是发生改变。
    问题一:上传头像时报错:
    Traceback (most recent call last): File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 703, in __call__ handler.post(*groups) File "/base/data/home/apps/s~ournwpu/1.358265977393805348/member.py", line 805, in post if config.upyun_enabled:AttributeError: 'module' object has no attribute 'upyun_enabled'
    然后头像貌似是上传成功了的,不过只在个人页面有显示,在主页没有显示,还是默认的头像。
    问题二:Twitter绑定无法完成,错误提示如下:
    Traceback (most recent call last): File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 701, in __call__ handler.get(*groups) File "/base/data/home/apps/s~ournwpu/1.358265977393805348/t.py", line 50, in get request_token = twitter.getRequestToken() File "/base/data/home/apps/s~ournwpu/1.358265977393805348/twitter/oauthtwitter.py", line 189, in getRequestToken resp = self._FetchUrl(url, no_cache=True) File "/base/data/home/apps/s~ournwpu/1.358265977393805348/twitter/oauthtwitter.py", line 101, in _FetchUrl url_data = opener.open(url).read() File "/base/python_runtime/python_dist/lib/python2.5/urllib2.py", line 387, in open response = meth(req, response) File "/base/python_runtime/python_dist/lib/python2.5/urllib2.py", line 498, in http_response 'http', request, response, code, msg, hdrs) File "/base/python_runtime/python_dist/lib/python2.5/urllib2.py", line 425, in error return self._call_chain(*args) File "/base/python_runtime/python_dist/lib/python2.5/urllib2.py", line 360, in _call_chain result = func(*args) File "/base/python_runtime/python_dist/lib/python2.5/urllib2.py", line 506, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)HTTPError: HTTP Error 401: Unauthorized
    我在twitter app里面的callback url 写的是`我的域名/twitter/oauth`,应该没错吧……
    6 条回复    1970-01-01 08:00:00 +08:00
    gujiaxi
        1
    gujiaxi  
    OP
       2012-04-17 18:20:54 +08:00
    @livid help
    fanzeyi
        2
    fanzeyi  
       2012-04-17 19:00:57 +08:00
    1. config.py 里加上 upyun_enabled = False
    2.
    fanzeyi
        3
    fanzeyi  
       2012-04-17 19:01:40 +08:00
    2 的话不知道……

    你们不会看看错误信息究竟写了什么么?
    gujiaxi
        4
    gujiaxi  
    OP
       2012-04-17 19:11:20 +08:00
    @fanzeyi thx for your answer.
    1. 这是什么原理呢?记得原来的版本不用加的
    2. 我搜索了一下,貌似是因为我只填写了development的那个key跟secret导致的
    PS. 唉、PB的文档貌似有点匮乏,有人写详细一点的说明文档吗……
    fanzeyi
        5
    fanzeyi  
       2012-04-17 19:48:44 +08:00
    @gujiaxi 因为 V2EX 中间有一段使用 又拍 做为头像存储…… 所以会有这个选项但是 Livid 没有加到 config 里面……
    linjh
        6
    linjh  
       2014-03-30 22:10:16 +08:00
    @gujiaxi 第一条请问你搞定了么,我加进去@fanzeyi的那条语句之后deploy不上去,出错了。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   979 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 21:57 · PVG 05:57 · LAX 14:57 · JFK 17:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.