I'm having trouble while using google.cloud for Storage. I start by trying to list blobs in a bucket.
I'm trying to get threw the proxy of my organization. So I try to create my own http connection in order to specify the proxy, but even with a simple urllib3.PoolManager(), I keep getting the error and stacktrace bellow:
Traceback (most recent call last)
<ipython-input-9-a7bd2d0fcc13> in <module>()
3 authed_http = AuthorizedHttp(credentials, http)
4 storage_client = storage.Client(_http=http)
----> 5 bucket = storage_client.get_bucket('mybucket')
6 blobs = bucket.list_blobs()
7
/gpfs/user/u515866/env_python2/lib/python2.7/site-packages/google/cloud/storage/client.pyc in get_bucket(self, bucket_name)
171 """
172 bucket = Bucket(self, name=bucket_name)
--> 173 bucket.reload(client=self)
174 return bucket
175
/gpfs/user/u515866/env_python2/lib/python2.7/site-packages/google/cloud/storage/_helpers.pyc in reload(self, client)
97 api_response = client._connection.api_request(
98 method='GET', path=self.path, query_params=query_params,
---> 99 _target_object=self)
100 self._set_properties(api_response)
101
/gpfs/user/u515866/env_python2/lib/python2.7/site-packages/google/cloud/_http.pyc in api_request(self, method, path, query_params, data, content_type, headers, api_base_url, api_version, expect_json, _target_object)
297 response, content = self._make_request(
298 method=method, url=url, data=data, content_type=content_type,
--> 299 headers=headers, target_object=_target_object)
300
301 if not 200 <= response.status < 300:
/gpfs/user/u515866/env_python2/lib/python2.7/site-packages/google/cloud/_http.pyc in _make_request(self, method, url, data, content_type, headers, target_object)
191 headers['User-Agent'] = self.USER_AGENT
192
--> 193 return self._do_request(method, url, headers, data, target_object)
194
195 def _do_request(self, method, url, headers, data,
/gpfs/user/u515866/env_python2/lib/python2.7/site-packages/google/cloud/_http.pyc in _do_request(self, method, url, headers, data, target_object)
221 """
222 return self.http.request(uri=url, method=method, headers=headers,
--> 223 body=data)
224
225 def api_request(self, method, path, query_params=None,
TypeError: request() takes at least 3 arguments (3 given)
Python is 2.7.11.
I'm using Jupyter (notebook server is 5.0.0).
Please feel free to reformat this issue if that could help.
Many thanks.
Hi,
I'm having trouble while using google.cloud for Storage. I start by trying to list blobs in a bucket.
I'm trying to get threw the proxy of my organization. So I try to create my own http connection in order to specify the proxy, but even with a simple urllib3.PoolManager(), I keep getting the error and stacktrace bellow:
Error:
TypeError: request() takes at least 3 arguments (3 given)
Stacktrace:
My code is the following:
Python is 2.7.11.
I'm using Jupyter (notebook server is 5.0.0).
pip freeze:Click to expand
Please feel free to reformat this issue if that could help.
Many thanks.