2015-11-06 48 views
0

我想在localhost上启动一个python应用程序引擎项目。我在Windows 8.1机器上(Python版本2.7)。项目代码从这里复制link。服务器似乎开始,但由于某些问题,页面无法正确加载。可能它无法访问api服务器。谷歌应用程序引擎端点api不在本地主机工作

这里是萤火一个截图显示失败请求

enter image description here

什么,似乎离我的是,在命令提示符下服务器在一些随机启动的API(我从那里开始开发服务器)除模块端口以外的端口。但该网页正试图访问模块端口的http://127.0.0.1:8000/_ah/api/static/proxy.html...页面。我试着在API服务器端口访问它,它在那里打开了一些页面。 (我的意思是我试图打开http://127.0.0.1:1532/_ah/api/static/proxy.html... seperately)它返回一些JSON我不明白...

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

命令提示符日志:

enter image description here

下面是本地主机的输出之间的差别* .appspot.com的

应该得到这样的: enter image description here

但坚持在这里:(复选按钮不加载) enter image description here

+0

你得到的错误是什么? – MayK

+0

该页面未完全加载,并且没有ajax请求到端点api正在通过... – bytestorm

+0

您正在使用哪个版本的sdk? – MayK

回答

0

我终于找到了解决办法here

步骤对于Windows:

  1. 转到您的谷歌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. 关闭应用程序,重新启动它。

相关问题