看看想想记记
« »
April 20, 2010杂杂杂

2,601 views

GAE(google app engine)搭建twitter API注意事项

搭建的教程:

月光的博客:>>

1.可能年代问题很多抢建的都有无法成功的例子
就现在来讲有两个情况:

1.Python ,现在python被墙了,所以下载都成问题
但是目前来看,python版本也成问题,最新版本的不见得能成功!

F:\Google\google_appengine>appcfg.py update gae
Traceback (most recent call last):
File “F:\Google\google_appengine\appcfg.py”, line 68, in
run_file(__file__, globals())
File “F:\Google\google_appengine\appcfg.py”, line 64, in run_file
execfile(script_path, globals_)
NameError: global name ‘execfile’ is not defined

记得把python换成2.5 2.6的就好
下载就可以搜 python 2.6 下载

2. APP不成功
执行:yourid.appspots.com/api/ 放在浏览器里会报
internal server error

这时要用这个办法了(转自):

出现“internal server error”错误,这个看别个说是代码里面有问题,你可以尝试删除code.py里面的下面一段代码:
import socket
import re
ua = web.ctx.environ.get(“HTTP_USER_AGENT”, ‘None’)
if ua.find(‘jibjib’) >= 0:
socket.setdefaulttimeout(60)
elif ua.find(‘zh-CN’) >= 0:
#raise Exception(‘unknown error’)
socket.setdefaulttimeout(2)
else:
socket.setdefaulttimeout(2)

日志信息 »

该日志于2010-04-20 09:52由 admin 发表在杂杂杂分类下, 你可以发表评论。除了可以将这个日志以保留源地址及作者的情况下引用到你的网站或博客,还可以通过RSS 2.0订阅这个日志的所有评论。

相关日志 »

  • No Related Post

没有评论

发表评论 »

返回顶部

Switch to our mobile site