2

切换到 gae 1.7.6 后,remote_api 不再工作。
1.7.5 运行良好。

应用程序.yaml

handlers:
- url: /rugad_remote.*
#script: google.appengine.ext.remote_api.handler.application #1.7.5
script: google.appengine.ext.remote_api.handler.app #1.7.6
login: admin

rugadweb.py

HOST = '127.0.0.1:8080'      #test  
#HOST = 'xxx.appspot.com'    #prod  

def auth_func():
    return None, None             #test
    #return 'xxxxx', 'yyyyyyyy'   #prod

remote_api_stub.ConfigureRemoteApi(None, '/rugad_remote', auth_func, HOST)   #1.7.6
#remote_api_stub.ConfigureRemoteDatastore(None, '/rugad_remote', auth_func, HOST) #1.7.5
    回溯(最近一次通话最后):
      文件“C:\rugad\rugadweb.py”,第 28 行,在
        remote_api_stub.ConfigureRemoteApi(无,'/rugad_remote',auth_func,主机)
      文件“C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\remo
    te_api\remote_api_stub.py",第 725 行,在 ConfigureRemoteApi
        app_id = GetRemoteAppIdFromServer(服务器,路径,rtok)
      文件“C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\remo
    te_api\remote_api_stub.py",第 568 行,在 GetRemoteAppIdFromServer 中
        响应 = server.Send(路径,有效负载 = 无,**urlargs)
      文件“C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
    pengine_rpc.py”,第 393 行,在发送中
        f = self.opener.open(req)
      文件“C:\Python27\lib\urllib2.py”,第 394 行,打开
        响应 = self._open(请求,数据)
      _open 中的文件“C:\Python27\lib\urllib2.py”,第 412 行
        '_open',请求)
      _call_chain 中的文件“C:\Python27\lib\urllib2.py”,第 372 行
        结果 = 函数(*args)
      http_open 中的文件“C:\Python27\lib\urllib2.py”,第 1199 行
        返回 self.do_open(httplib.HTTPConnection, req)
      文件“C:\Python27\lib\urllib2.py”,第 1174 行,在 do_open
        引发 URLError(err)
    urllib2.URLError: urlopen 错误 [Errno 10061] Es konnte keine Verbindung herges
    Tellt werden, da der Zielcomputer die Verbindung verweigerte
4

1 回答 1

0

我刚遇到同样的问题。我使用“localhost:8080”而不是“127.0.0.1:8080”修复它,并使用电子邮件地址登录。

HOST = 'localhost:8080'

def auth_func():
    return "user@example.com", "password"

remote_api_stub.ConfigureRemoteApi(None, '/rugad_remote', auth_func, HOST)
于 2013-03-30T15:00:11.903 回答