gpt4 book ai didi

python - Google App Engine Remote API 无法从本地客户端运行

转载 作者:行者123 更新时间:2023-12-04 04:27:01 24 4
gpt4 key购买 nike

这是使用 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正确适用于谷歌应用引擎 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'

最佳答案

等待 7 年,一切似乎都运行良好。

关于python - Google App Engine Remote API 无法从本地客户端运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16762879/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com