Google应用引擎端点api无法在localhost中运行

时间:2015-11-06 16:50:36

标签: python google-app-engine

我正在尝试在localhost上启动一个python app-engine项目。我在Windows 8.1机器(Python版本2.7)。项目代码从此处link复制。服务器似乎启动但由于某些问题页面无法正常加载。可能它无法到达api服务器。

这是来自firebug的镜头,显示失败的请求

enter image description here

在我看来,在命令提示符(我从那里启动了dev服务器)中,API服务器是在模块端口以外的某个随机端口启动的。但该网页正在尝试访问模块端口的http://127.0.0.1:8000/_ah/api/static/proxy.html...页面。我尝试在API服务器端口访问它,它确实在那里打开了一些页面。 (我的意思是我尝试单独打开http://127.0.0.1:1532/_ah/api/static/proxy.html...)它返回一些我不明白的json ......

{app_id: dev~udatut-bs, rtok: '0'}

命令提示日志:

enter image description here

这是localhost和* .appspot.com

中输出的区别

应该得到这个: enter image description here

但卡在这里:(检查按钮未加载) enter image description here

1 个答案:

答案 0 :(得分:0)

我终于找到了解决方案here

Windows的步骤:

  1. 转到google appengine安装文件夹,然后转到./google/appengine/toots。 (C:\ Program Files(x86)\ Google \ google_appengine \ google \ appengine \ tools)如果您遵循默认安装说明。

  2. 打开文件 appengine_rpc.py 并查找该行(朝向文件末尾)

    opener.add_handler(fancy_urllib.FancyProxyHandler())
    

    并将其评论为

    # opener.add_handler(fancy_urllib.FancyProxyHandler())
    
  3. 关闭应用并重新启动。

相关问题