Google App Engine Remote API无法在本地客户端上运行

时间:2013-05-26 19:23:47

标签: python google-app-engine google-cloud-platform remoteapi

这是使用Python SDK版本1.8.0。

我的远程API使用remote_api_shell.py工作正常,但在尝试从python脚本中访问时不起作用。我正在使用sample code from google

from google.appengine.ext.remote_api import remote_api_stub
import getpass

def auth_func():
  return (raw_input('Username:'), getpass.getpass('Password:'))

remote_api_stub.ConfigureRemoteApi(None, '/_ah/remote_api', auth_func,
                               'localhost:8080')

我还要从fix_sys_path()导入dev_appserver.py以正确设置我的sys.path Google应用引擎SDK:

import dev_appserver
dev_appserver.fix_sys_path()

在其他路径中添加以下行到我的sys.path

'/google_appengine_1.8.0/lib/fancy_urllib'

但是,调用remote_api_stub.ConfigureRemoteApi()的上述调用时会抛出以下错误:

opener.add_handler(fancy_urllib.FancyProxyHandler())
AttributeError: 'module' object has no attribute 'FancyProxyHandler'

1 个答案:

答案 0 :(得分:2)

等 7 年,一切似乎都很好。

相关问题