Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/359.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 通过远程\u api\u shell.py获取\u服务\u url_Python_Google App Engine_Console - Fatal编程技术网

Python 通过远程\u api\u shell.py获取\u服务\u url

Python 通过远程\u api\u shell.py获取\u服务\u url,python,google-app-engine,console,Python,Google App Engine,Console,我想记录我正在使用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.appeng

我想记录我正在使用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
>c.image\u blob
>>>从google.appengine.api.images导入获取服务url
>>>获取服务url(c.image\u blob)
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine default.bundle/Contents/Resources/google\u appengine/google/appengine/api/images/\uuuuuuuu init\uuuuuuuu.py”,第1231行,在get\u url中
(答复)
MakeSyncCall中的第94行文件“/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine/google/appengine/api/apiproxy\u stub\u map.py”
返回stubmap.MakeSyncCall(服务、调用、请求、响应)
MakeSyncCall中的第308行文件“/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine/google/appengine/api/apiproxy\u stub\u map.py”
rpc.CheckSuccess()
文件“/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine default.bundle/Contents/Resources/google\u appengine/google/appengine/api/apiproxy\u rpc.py”,第156行,在
self.request,self.response)
MakeSyncCall中的文件“/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine/google/appengine/ext/remote\u api/remote\u api\u stub.py”第178行
self.\u MakeRealSyncCall(服务、呼叫、请求、响应)
文件“/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine default.bundle/Contents/Resources/google\u appengine/google/appengine/ext/remote\u api/remote\u api\u stub.py”,第198行,在MakeRealSyncCall中
提升pickle.load(响应\u pb.exception())
CallNotFoundError

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

remote_api
当前没有
get_serving_url
api调用的映射。您可以通过导入并将其添加到适当位置的dict中来添加它,但无论哪种方式,您都应该明确地添加它。

App Engine没有“manage.py console”。你是在说Django吗?刚刚从appengine请求了这个功能。你有没有可能详细介绍一下如何为新手做这个?