[英]Google app engine endpoints api not working in localhost
I am trying to start a python app-engine project on localhost. 我正在尝试在本地主机上启动python应用程序引擎项目。 I am in a Windows 8.1 machine (Python version 2.7).
我在Windows 8.1计算机(Python版本2.7)中。 The project code is copied from here link .
从此处链接复制项目代码。 The server seems to start but the page wouldn't properly load due to some problem.
服务器似乎已启动,但是由于某些问题页面无法正确加载。 Probably it can't reach the api server.
可能无法到达api服务器。
Here is a shot from firebug showing the failed request 这是萤火虫的镜头,显示了失败的请求
What seems off to me is that in command prompt (I started the dev server from there) the API server is started at some random port other than the module port. 在我看来,是在命令提示符(我从那里启动开发服务器)中,API服务器是从模块端口以外的某个随机端口启动的。 But the webpage is trying to access the
http://127.0.0.1:8000/_ah/api/static/proxy.html...
page at the module port. 但是该网页正尝试在模块端口访问
http://127.0.0.1:8000/_ah/api/static/proxy.html...
页面。 I tried accessing it at the API server port it does open some page there. 我尝试通过API服务器端口访问它,但确实在那打开了一些页面。 (I mean I tried opening
http://127.0.0.1:1532/_ah/api/static/proxy.html...
seperately) It returns some json I don't understand... (我的意思是我尝试分别打开
http://127.0.0.1:1532/_ah/api/static/proxy.html...
)它返回一些我不理解的json ...
{app_id: dev~udatut-bs, rtok: '0'}
Command prompt log: 命令提示符日志:
Here's the difference between the outputs in localhost and *.appspot.com 这是localhost和* .appspot.com中的输出之间的差异
But stuck here:(check buttons are not loaded) 但卡在这里:(未加载检查按钮)
I finally found a solution here . 我终于在这里找到了解决方案。
Steps for windows: Windows的步骤:
Goto your google appengine installation folder and then ./google/appengine/toots. 转到您的google appengine安装文件夹,然后转到./google/appengine/toots。 (C:\\Program Files (x86)\\Google\\google_appengine\\google\\appengine\\tools) if you followed default installation instructions.
(C:\\ Program Files(x86)\\ Google \\ google_appengine \\ google \\ appengine \\ tools)如果遵循默认安装说明。
Open the file appengine_rpc.py and look for the line (towards the end of the file) 打开文件appengine_rpc.py并查找该行(朝文件结尾)
opener.add_handler(fancy_urllib.FancyProxyHandler())
and comment it out like 并像这样注释掉
# opener.add_handler(fancy_urllib.FancyProxyHandler())
Close the app and restart it again. 关闭应用程序,然后再次重新启动。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.