gpt4 book ai didi

python - get_serving_url 通过 remote_api_shell.py

转载 作者:太空宇宙 更新时间:2023-11-03 11:34:53 25 4
gpt4 key购买 nike

我想记录我正在使用 appengine 存储的图像的所有当前 url。但是,当使用 appengine 的 remote_api_shell.py 控制台时,我无法使用 get_serving_url 函数,即使我在本地计算机上正确设置了 PIL。

>>> c.image_blob
<google.appengine.ext.blobstore.blobstore.BlobInfo object at 0x16f0150>
>>> from google.appengine.api.images import get_serving_url
>>> get_serving_url(c.image_blob)
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/images/__init__.py", line 1231, in get_serving_url
response)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 308, in MakeSyncCall
rpc.CheckSuccess()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/apiproxy_rpc.py", line 156, in _WaitImpl
self.request, self.response)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 178, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 198, in _MakeRealSyncCall
raise pickle.loads(response_pb.exception())
CallNotFoundError

现在我只是想在 appengine 生产机器上为我做一些肮脏的工作,但我觉得应该有一种方法可以通过控制台调用 get_serving_url 函数。

最佳答案

remote_api 当前没有 get_serving_url API 调用的映射。您可以通过导入自己添加 remote_api_services并将其添加到适当位置的 dict 中,但无论哪种方式,您绝对应该 file a feature request .

关于python - get_serving_url 通过 remote_api_shell.py,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7017972/

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