简体   繁体   English

Google App Engine端点api在localhost中不起作用

[英]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中的输出之间的差异

Should get this: 应该得到这个: 在此处输入图片说明

But stuck here:(check buttons are not loaded) 但卡在这里:(未加载检查按钮) 在此处输入图片说明

I finally found a solution here . 我终于在这里找到了解决方案。

Steps for windows: Windows的步骤:

  1. 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)如果遵循默认安装说明。

  2. 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()) 
  3. Close the app and restart it again. 关闭应用程序,然后再次重新启动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google App Engine配置端点API - Google App Engine configuring Endpoints API Google App Engine Api和端点版本控制 - Google App Engine Api and Endpoints versioning 在Google App Engine云端点内部调用Drive API - Make calls to Drive API inside of a Google App Engine Cloud Endpoints Google App Engine-端点API-从另一个App Engine应用程序使用-python - Google App Engine - Endpoints API - Consuming from another App Engine App -python 使用App Engine SDK在localhost中部署我的Google端点python应用程序时出错 - Error when I am deploying my google cloud endpoints python application in localhost with App Engine SDK 代码可在localhost上运行,但在使用Google App Engine进行部署时无法运行 - Code working on localhost, but not working when deployed using Google App Engine 在没有App Engine的情况下运行Google Cloud端点 - Running google cloud endpoints without App Engine 如何使用OAuth从Python应用程序访问Google App Engine端点API? - How can I access Google App Engine endpoints API from Python application with use OAuth? Google Cloud Endpoints V2多类API错误App Engine标准 - Google Cloud Endpoints V2 multi-class API error App Engine Standard 在本地主机上重置Google App Engine应用程序数据 - Google App Engine App data reset on localhost
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM