Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for oauth2client exception, use google-auth library.
Fix for exception: See also googleapis/google-api-python-client#218 (comment) Traceback (most recent call last): File "/work/src/experiment/scheduler.py", line 602, in schedule_loop trial_instance_manager.handle_preempted_trials() File "/work/src/experiment/scheduler.py", line 538, in handle_preempted_trials if not delete_instances(instances, self.experiment_config): File "/work/src/experiment/scheduler.py", line 112, in delete_instances i for i in gce.get_instances(cloud_project, cloud_compute_zone) File "/work/src/experiment/scheduler.py", line 112, in <listcomp> i for i in gce.get_instances(cloud_project, cloud_compute_zone) File "/work/src/common/gce.py", line 46, in get_instances for instance in _get_instance_items(project, zone): File "/work/src/common/gce.py", line 37, in _get_instance_items response = request.execute() File "/work/.venv/lib/python3.7/site-packages/googleapiclient/_helpers.py", line 134, in positional_wrapper return wrapped(*args, **kwargs) File "/work/.venv/lib/python3.7/site-packages/googleapiclient/http.py", line 901, in execute headers=self.headers, File "/work/.venv/lib/python3.7/site-packages/googleapiclient/http.py", line 204, in _retry_request raise exception File "/work/.venv/lib/python3.7/site-packages/googleapiclient/http.py", line 177, in _retry_request resp, content = http.request(uri, method, *args, **kwargs) File "/work/.venv/lib/python3.7/site-packages/oauth2client/transport.py", line 186, in new_request credentials._refresh(orig_request_method) File "/work/.venv/lib/python3.7/site-packages/oauth2client/client.py", line 749, in _refresh self._do_refresh_request(http) File "/work/.venv/lib/python3.7/site-packages/oauth2client/client.py", line 780, in _do_refresh_request body=body, headers=headers) File "/work/.venv/lib/python3.7/site-packages/oauth2client/transport.py", line 282, in request connection_type=connection_type) File "/work/.venv/lib/python3.7/site-packages/httplib2/__init__.py", line 1994, in request cachekey, File "/work/.venv/lib/python3.7/site-packages/httplib2/__init__.py", line 1651, in _request conn, request_uri, method, body, headers File "/work/.venv/lib/python3.7/site-packages/httplib2/__init__.py", line 1558, in _conn_request conn.request(method, request_uri, body, headers) File "/usr/local/lib/python3.7/http/client.py", line 1252, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/lib/python3.7/http/client.py", line 1298, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.7/http/client.py", line 1247, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.7/http/client.py", line 1065, in _send_output self.send(chunk) File "/usr/local/lib/python3.7/http/client.py", line 987, in send self.sock.sendall(data) File "/usr/local/lib/python3.7/ssl.py", line 1034, in sendall v = self.send(byte_view[count:]) File "/usr/local/lib/python3.7/ssl.py", line 1003, in send return self._sslobj.write(data) BrokenPipeError: [Errno 32] Broken pipe Message: Error occurred during scheduling."
- Loading branch information