2

問題があります。Googleクラウドストレージに保存されているデータにアクセスしたいのですが、エラーが発生し、どこから来たのかわかりません。

これが私のコードです:

    DECORATOR = oauth2decorator_from_clientsecrets(
        CLIENT_SECRETS,
        scope=[
               'https://www.googleapis.com/auth/devstorage.read_only',
               ],
        message=MISSING_CLIENT_SECRETS_MESSAGE)
    http = DECORATOR.http()
    service_cloud = build("storage", "v1beta1")
    list_response = service_cloud.objects().list(bucket="directory_structure").execute(http=http)

    params = {'directory_list':list_response['items']}
    return self.render_template('directoryChoice.html', **params)

私が受け取るエラーメッセージは次のとおりです。

Traceback (most recent call last): 
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in __call__ rv = self.router.dispatch(request, response) 
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher return route.handler_adapter(request, response) 
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in __call__ return handler.dispatch() 
File "/base/data/home/apps/s~jba-gae-boilerplate/dev.366111306063368728/boilerplate/lib/basehandler.py", line 162, in dispatch webapp2.RequestHandler.dispatch(self) 
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch return self.handle_exception(e, self.app.debug) 
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch return method(*args, **kwargs) 
File "/base/data/home/apps/s~jba-gae-boilerplate/dev.366111306063368728/web/lib/oauth2client/appengine.py", line 469, in check_oauth return method(request_handler, *args, **kwargs) 
File "/base/data/home/apps/s~jba-gae-boilerplate/dev.366111306063368728/web/handlers.py", line 190, in get list_response = service_cloud.objects().list(bucket="jba_directory").execute(http=http) 
File "/base/data/home/apps/s~jba-gae-boilerplate/dev.366111306063368728/web/lib/oauth2client/util.py", line 120, in positional_wrapper return wrapped(*args, **kwargs) 
File "/base/data/home/apps/s~jba-gae-boilerplate/dev.366111306063368728/web/lib/apiclient/http.py", line 678, in execute raise HttpError(resp, content, uri=self.uri) 
HttpError:
4

1 に答える 1