升级到gae 1.7.6后,远程api Error-10061

时间:2013-03-21 08:09:45

标签: python google-app-engine python-2.7

切换到gae 1.7.6后,remote_api不再工作了。
1.7.5工作正常。

的app.yaml

处理程序:
- url:/rugad_remote.*
  #script:google.appengine.ext.remote_api.handler.application#1.7.5
  脚本:google.appengine.ext.remote_api.handler.app#1.7.6
  登录: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
    Traceback (most recent call last):
      File "C:\rugad\rugadweb.py", line 28, in 
        remote_api_stub.ConfigureRemoteApi(None, '/rugad_remote', auth_func, HOST)
      File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\remo
    te_api\remote_api_stub.py", line 725, in ConfigureRemoteApi
        app_id = GetRemoteAppIdFromServer(server, path, rtok)
      File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\remo
    te_api\remote_api_stub.py", line 568, in GetRemoteAppIdFromServer
        response = server.Send(path, payload=None, **urlargs)
      File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
    pengine_rpc.py", line 393, in Send
        f = self.opener.open(req)
      File "C:\Python27\lib\urllib2.py", line 394, in open
        response = self._open(req, data)
      File "C:\Python27\lib\urllib2.py", line 412, in _open
        '_open', req)
      File "C:\Python27\lib\urllib2.py", line 372, in _call_chain
        result = func(*args)
      File "C:\Python27\lib\urllib2.py", line 1199, in http_open
        return self.do_open(httplib.HTTPConnection, req)
      File "C:\Python27\lib\urllib2.py", line 1174, in do_open
        raise URLError(err)
    urllib2.URLError: urlopen error [Errno 10061] Es konnte keine Verbindung herges
    tellt werden, da der Zielcomputer die Verbindung verweigerte

1 个答案:

答案 0 :(得分: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)