geemap icon indicating copy to clipboard operation
geemap copied to clipboard

Timed out

Open gaowudao opened this issue 6 years ago • 7 comments

  • geemap version:0.6.3
  • Python version:3.7
  • Operating System:Mac

Description

To create an ipyleaflet-based interactive map:

What I Did

import geemap Map = geemap.Map(center=[40,-100], zoom=4) Map

The authorization workflow will generate a code, which you should paste in the box below

Enter verification code: 4/ygHh6q9jZKNxNFZGzqyBdZ_hDzh2RWWUdByY16Q6Jv2eXm5eCTTnTV4

Successfully saved authorization token.

If there was a crash, please include the traceback here.

TimeoutError Traceback (most recent call last) ~/opt/anaconda3/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self) 156 conn = connection.create_connection( --> 157 (self._dns_host, self.port), self.timeout, **extra_kw 158 )

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options) 83 if err is not None: ---> 84 raise err 85

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options) 73 sock.bind(source_address) ---> 74 sock.connect(sa) 75 return sock

TimeoutError: [Errno 60] Operation timed out

During handling of the above exception, another exception occurred:

NewConnectionError Traceback (most recent call last) ~/opt/anaconda3/lib/python3.7/site-packages/httplib2shim/init.py in _conn_request(self, conn, request_uri, method, body, headers) 147 timeout=urllib3.Timeout(total=self.timeout), --> 148 decode_content=decode) 149

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/request.py in request(self, method, url, fields, headers, **urlopen_kw) 79 return self.request_encode_body( ---> 80 method, url, fields=fields, headers=headers, **urlopen_kw 81 )

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/request.py in request_encode_body(self, method, url, fields, headers, encode_multipart, multipart_boundary, **urlopen_kw) 170 --> 171 return self.urlopen(method, url, **extra_kw)

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/poolmanager.py in urlopen(self, method, url, redirect, **kw) 329 else: --> 330 response = conn.urlopen(method, u.request_uri, **kw) 331

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 719 retries = retries.increment( --> 720 method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] 721 )

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/util/retry.py in increment(self, method, url, response, error, _pool, _stacktrace) 375 # Disabled, indicate to re-raise the error. --> 376 raise six.reraise(type(error), error, _stacktrace) 377

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/packages/six.py in reraise(tp, value, tb) 734 raise value.with_traceback(tb) --> 735 raise value 736 finally:

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 671 headers=headers, --> 672 chunked=chunked, 673 )

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 375 try: --> 376 self._validate_conn(conn) 377 except (SocketTimeout, BaseSSLError) as e:

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in _validate_conn(self, conn) 993 if not getattr(conn, "sock", None): # AppEngine might not have .sock --> 994 conn.connect() 995

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/connection.py in connect(self) 299 # Add certificate verification --> 300 conn = self._new_conn() 301 hostname = self.host

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self) 168 raise NewConnectionError( --> 169 self, "Failed to establish a new connection: %s" % e 170 )

NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x11bf026d0>: Failed to establish a new connection: [Errno 60] Operation timed out

During handling of the above exception, another exception occurred:

timeout Traceback (most recent call last) ~/opt/anaconda3/lib/python3.7/site-packages/geemap/geemap.py in ee_initialize() 19 try: ---> 20 ee.Initialize() 21 except Exception as e:

~/opt/anaconda3/lib/python3.7/site-packages/ee/init.py in Initialize(credentials, opt_url, use_cloud_api, cloud_api_key, http_transport, project) 122 project=project, --> 123 http_transport=http_transport) 124 # Initialize the dynamically loaded functions on the objects that want them.

~/opt/anaconda3/lib/python3.7/site-packages/ee/data.py in initialize(credentials, api_base_url, tile_base_url, use_cloud_api, cloud_api_base_url, cloud_api_key, project, http_transport) 209 --> 210 _install_cloud_api_resource() 211

~/opt/anaconda3/lib/python3.7/site-packages/ee/data.py in _install_cloud_api_resource() 286 response_inspector=_handle_profiling_response, --> 287 http_transport=_http_transport) 288

~/opt/anaconda3/lib/python3.7/site-packages/ee/_cloud_api_utils.py in build_cloud_resource(api_base_url, api_key, credentials, timeout, headers_supplier, response_inspector, http_transport, raw) 148 requestBuilder=request_builder, --> 149 model=alt_model) 150 return resource

~/opt/anaconda3/lib/python3.7/site-packages/googleapiclient/_helpers.py in positional_wrapper(*args, **kwargs) 133 logger.warning(message) --> 134 return wrapped(*args, **kwargs) 135

~/opt/anaconda3/lib/python3.7/site-packages/googleapiclient/discovery.py in build(serviceName, version, http, discoveryServiceUrl, developerKey, model, requestBuilder, credentials, cache_discovery, cache, client_options) 224 content = _retrieve_discovery_doc( --> 225 requested_url, discovery_http, cache_discovery, cache, developerKey 226 )

~/opt/anaconda3/lib/python3.7/site-packages/googleapiclient/discovery.py in _retrieve_discovery_doc(url, http, cache_discovery, cache, developerKey) 281 --> 282 resp, content = http.request(actual_url) 283

~/opt/anaconda3/lib/python3.7/site-packages/google_auth_httplib2.py in request(self, uri, method, body, headers, **kwargs) 186 self.credentials.before_request( --> 187 self._request, method, uri, request_headers) 188

~/opt/anaconda3/lib/python3.7/site-packages/google/auth/credentials.py in before_request(self, request, method, url, headers) 123 if not self.valid: --> 124 self.refresh(request) 125 self.apply(headers)

~/opt/anaconda3/lib/python3.7/site-packages/google/oauth2/credentials.py in refresh(self, request) 182 self._client_secret, --> 183 self._scopes, 184 )

~/opt/anaconda3/lib/python3.7/site-packages/google/oauth2/_client.py in refresh_grant(request, token_uri, refresh_token, client_id, client_secret, scopes) 247 --> 248 response_data = _token_endpoint_request(request, token_uri, body) 249

~/opt/anaconda3/lib/python3.7/site-packages/google/oauth2/_client.py in _token_endpoint_request(request, token_uri, body) 104 while True: --> 105 response = request(method="POST", url=token_uri, headers=headers, body=body) 106 response_body = (

~/opt/anaconda3/lib/python3.7/site-packages/google_auth_httplib2.py in call(self, url, method, body, headers, timeout, **kwargs) 115 response, data = self.http.request( --> 116 url, method=method, body=body, headers=headers, **kwargs) 117 return _Response(response, data)

~/opt/anaconda3/lib/python3.7/site-packages/httplib2/init.py in request(self, uri, method, body, headers, redirections, connection_type) 1990 redirections, -> 1991 cachekey, 1992 )

~/opt/anaconda3/lib/python3.7/site-packages/httplib2/init.py in _request(self, conn, host, absolute_uri, request_uri, method, body, headers, redirections, cachekey) 1650 (response, content) = self._conn_request( -> 1651 conn, request_uri, method, body, headers 1652 )

~/opt/anaconda3/lib/python3.7/site-packages/httplib2shim/init.py in _conn_request(self, conn, request_uri, method, body, headers) 153 except Exception as e: --> 154 raise _map_exception(e) 155

timeout: timed out

During handling of the above exception, another exception occurred:

TimeoutError Traceback (most recent call last) ~/opt/anaconda3/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self) 156 conn = connection.create_connection( --> 157 (self._dns_host, self.port), self.timeout, **extra_kw 158 )

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options) 83 if err is not None: ---> 84 raise err 85

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options) 73 sock.bind(source_address) ---> 74 sock.connect(sa) 75 return sock

TimeoutError: [Errno 60] Operation timed out

During handling of the above exception, another exception occurred:

NewConnectionError Traceback (most recent call last) ~/opt/anaconda3/lib/python3.7/site-packages/httplib2shim/init.py in _conn_request(self, conn, request_uri, method, body, headers) 147 timeout=urllib3.Timeout(total=self.timeout), --> 148 decode_content=decode) 149

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/request.py in request(self, method, url, fields, headers, **urlopen_kw) 79 return self.request_encode_body( ---> 80 method, url, fields=fields, headers=headers, **urlopen_kw 81 )

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/request.py in request_encode_body(self, method, url, fields, headers, encode_multipart, multipart_boundary, **urlopen_kw) 170 --> 171 return self.urlopen(method, url, **extra_kw)

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/poolmanager.py in urlopen(self, method, url, redirect, **kw) 329 else: --> 330 response = conn.urlopen(method, u.request_uri, **kw) 331

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 719 retries = retries.increment( --> 720 method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] 721 )

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/util/retry.py in increment(self, method, url, response, error, _pool, _stacktrace) 375 # Disabled, indicate to re-raise the error. --> 376 raise six.reraise(type(error), error, _stacktrace) 377

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/packages/six.py in reraise(tp, value, tb) 734 raise value.with_traceback(tb) --> 735 raise value 736 finally:

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 671 headers=headers, --> 672 chunked=chunked, 673 )

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 375 try: --> 376 self._validate_conn(conn) 377 except (SocketTimeout, BaseSSLError) as e:

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in _validate_conn(self, conn) 993 if not getattr(conn, "sock", None): # AppEngine might not have .sock --> 994 conn.connect() 995

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/connection.py in connect(self) 299 # Add certificate verification --> 300 conn = self._new_conn() 301 hostname = self.host

~/opt/anaconda3/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self) 168 raise NewConnectionError( --> 169 self, "Failed to establish a new connection: %s" % e 170 )

NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x108bb05d0>: Failed to establish a new connection: [Errno 60] Operation timed out

During handling of the above exception, another exception occurred:

timeout Traceback (most recent call last) in ----> 1 Map = geemap.Map(center=[40,-100], zoom=4) 2 Map

~/opt/anaconda3/lib/python3.7/site-packages/geemap/geemap.py in init(self, **kwargs) 37 38 # Authenticates Earth Engine and initialize an Earth Engine session ---> 39 ee_initialize() 40 41 # Default map center location and zoom level

~/opt/anaconda3/lib/python3.7/site-packages/geemap/geemap.py in ee_initialize() 21 except Exception as e: 22 ee.Authenticate() ---> 23 ee.Initialize() 24 25

~/opt/anaconda3/lib/python3.7/site-packages/ee/init.py in Initialize(credentials, opt_url, use_cloud_api, cloud_api_key, http_transport, project) 121 cloud_api_key=cloud_api_key, 122 project=project, --> 123 http_transport=http_transport) 124 # Initialize the dynamically loaded functions on the objects that want them. 125 ApiFunction.initialize()

~/opt/anaconda3/lib/python3.7/site-packages/ee/data.py in initialize(credentials, api_base_url, tile_base_url, use_cloud_api, cloud_api_base_url, cloud_api_key, project, http_transport) 208 _http_transport = http_transport 209 --> 210 _install_cloud_api_resource() 211 212 if project is not None:

~/opt/anaconda3/lib/python3.7/site-packages/ee/data.py in _install_cloud_api_resource() 285 headers_supplier=_make_request_headers, 286 response_inspector=_handle_profiling_response, --> 287 http_transport=_http_transport) 288 289 _cloud_api_resource_raw = _cloud_api_utils.build_cloud_resource(

~/opt/anaconda3/lib/python3.7/site-packages/ee/_cloud_api_utils.py in build_cloud_resource(api_base_url, api_key, credentials, timeout, headers_supplier, response_inspector, http_transport, raw) 147 http=http_transport, 148 requestBuilder=request_builder, --> 149 model=alt_model) 150 return resource 151

~/opt/anaconda3/lib/python3.7/site-packages/googleapiclient/_helpers.py in positional_wrapper(*args, **kwargs) 132 elif positional_parameters_enforcement == POSITIONAL_WARNING: 133 logger.warning(message) --> 134 return wrapped(*args, **kwargs) 135 136 return positional_wrapper

~/opt/anaconda3/lib/python3.7/site-packages/googleapiclient/discovery.py in build(serviceName, version, http, discoveryServiceUrl, developerKey, model, requestBuilder, credentials, cache_discovery, cache, client_options) 223 try: 224 content = _retrieve_discovery_doc( --> 225 requested_url, discovery_http, cache_discovery, cache, developerKey 226 ) 227 return build_from_document(

~/opt/anaconda3/lib/python3.7/site-packages/googleapiclient/discovery.py in _retrieve_discovery_doc(url, http, cache_discovery, cache, developerKey) 280 logger.info("URL being requested: GET %s", actual_url) 281 --> 282 resp, content = http.request(actual_url) 283 284 if resp.status >= 400:

~/opt/anaconda3/lib/python3.7/site-packages/google_auth_httplib2.py in request(self, uri, method, body, headers, **kwargs) 185 186 self.credentials.before_request( --> 187 self._request, method, uri, request_headers) 188 189 # Check if the body is a file-like stream, and if so, save the body

~/opt/anaconda3/lib/python3.7/site-packages/google/auth/credentials.py in before_request(self, request, method, url, headers) 122 # the http request.) 123 if not self.valid: --> 124 self.refresh(request) 125 self.apply(headers) 126

~/opt/anaconda3/lib/python3.7/site-packages/google/oauth2/credentials.py in refresh(self, request) 181 self._client_id, 182 self._client_secret, --> 183 self._scopes, 184 ) 185

~/opt/anaconda3/lib/python3.7/site-packages/google/oauth2/_client.py in refresh_grant(request, token_uri, refresh_token, client_id, client_secret, scopes) 246 body["scope"] = " ".join(scopes) 247 --> 248 response_data = _token_endpoint_request(request, token_uri, body) 249 250 try:

~/opt/anaconda3/lib/python3.7/site-packages/google/oauth2/_client.py in _token_endpoint_request(request, token_uri, body) 103 # occurs. 104 while True: --> 105 response = request(method="POST", url=token_uri, headers=headers, body=body) 106 response_body = ( 107 response.data.decode("utf-8")

~/opt/anaconda3/lib/python3.7/site-packages/google_auth_httplib2.py in call(self, url, method, body, headers, timeout, **kwargs) 114 _LOGGER.debug('Making request: %s %s', method, url) 115 response, data = self.http.request( --> 116 url, method=method, body=body, headers=headers, **kwargs) 117 return _Response(response, data) 118 except httplib2.HttpLib2Error as exc:

~/opt/anaconda3/lib/python3.7/site-packages/httplib2/init.py in request(self, uri, method, body, headers, redirections, connection_type) 1989 headers, 1990 redirections, -> 1991 cachekey, 1992 ) 1993 except Exception as e:

~/opt/anaconda3/lib/python3.7/site-packages/httplib2/init.py in _request(self, conn, host, absolute_uri, request_uri, method, body, headers, redirections, cachekey) 1649 1650 (response, content) = self._conn_request( -> 1651 conn, request_uri, method, body, headers 1652 ) 1653

~/opt/anaconda3/lib/python3.7/site-packages/httplib2shim/init.py in _conn_request(self, conn, request_uri, method, body, headers) 152 153 except Exception as e: --> 154 raise _map_exception(e) 155 156 return response, content

timeout: timed out

gaowudao avatar Apr 11 '20 02:04 gaowudao

@gaowudao Keep in mind that Google is blocked in China. If you are trying to use Google Earth Engine in China, you need to deal with the Great Firewall. Otherwise, you won't be able to connect to Earth Engine, which will result in timed out errors.

giswqs avatar Apr 11 '20 04:04 giswqs

@giswqs Yeah, understood. Thank you very much. Really wanna learn geemap in JupyterLab

gaowudao avatar Apr 12 '20 01:04 gaowudao

@giswqs Ok, another question: I have solved the timed out problems. Then, there is a problem in jupyterLab: import geemap Map = geemap.Map(center=[40,-100], zoom=4) Map

Error displaying widget: model not found

However, It works fine and show the map in jupyter notebook.

gaowudao avatar Apr 12 '20 01:04 gaowudao

You might need to install the JupyterLab extension (source):

jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-leaflet

giswqs avatar Apr 12 '20 01:04 giswqs

@giswqs Wow, Thank you very much, two problems have been solved in a few minutes. I am learning the geemap through lessons in youtube. Nice work.

gaowudao avatar Apr 12 '20 02:04 gaowudao

Good to know that it worked. Feel free to open a new issue if you encounter any problems with geemap.

giswqs avatar Apr 12 '20 02:04 giswqs

I used VPN but still got the same timeout problem, and I tried to use Anaconda to install a new env(python3.7),and installed the jupyter notebook but when I started it,I got kernel error. thanks

Enter verification code: 4/3QF3LgB9d3PTWp7yL0m72hnKv4TWQglU7O6yn6SFknSBp7mgfD_X1RQ

Successfully saved authorization token.

TimeoutError Traceback (most recent call last) E:\anaconda\lib\site-packages\urllib3\connection.py in _new_conn(self) 158 conn = connection.create_connection( --> 159 (self._dns_host, self.port), self.timeout, **extra_kw) 160

E:\anaconda\lib\site-packages\urllib3\util\connection.py in create_connection(address, timeout, source_address, socket_options) 79 if err is not None: ---> 80 raise err 81

E:\anaconda\lib\site-packages\urllib3\util\connection.py in create_connection(address, timeout, source_address, socket_options) 69 sock.bind(source_address) ---> 70 sock.connect(sa) 71 return sock

TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

During handling of the above exception, another exception occurred:

NewConnectionError Traceback (most recent call last) E:\anaconda\lib\site-packages\httplib2shim_init_.py in _conn_request(self, conn, request_uri, method, body, headers) 147 timeout=urllib3.Timeout(total=self.timeout), --> 148 decode_content=decode) 149

E:\anaconda\lib\site-packages\urllib3\request.py in request(self, method, url, fields, headers, **urlopen_kw) 71 headers=headers, ---> 72 **urlopen_kw) 73

E:\anaconda\lib\site-packages\urllib3\request.py in request_encode_body(self, method, url, fields, headers, encode_multipart, multipart_boundary, **urlopen_kw) 149 --> 150 return self.urlopen(method, url, **extra_kw)

E:\anaconda\lib\site-packages\urllib3\poolmanager.py in urlopen(self, method, url, redirect, **kw) 323 else: --> 324 response = conn.urlopen(method, u.request_uri, **kw) 325

E:\anaconda\lib\site-packages\urllib3\connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 637 retries = retries.increment(method, url, error=e, _pool=self, --> 638 _stacktrace=sys.exc_info()[2]) 639 retries.sleep()

E:\anaconda\lib\site-packages\urllib3\util\retry.py in increment(self, method, url, response, error, _pool, _stacktrace) 343 # Disabled, indicate to re-raise the error. --> 344 raise six.reraise(type(error), error, _stacktrace) 345

E:\anaconda\lib\site-packages\urllib3\packages\six.py in reraise(tp, value, tb) 685 raise value.with_traceback(tb) --> 686 raise value 687

E:\anaconda\lib\site-packages\urllib3\connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 599 body=body, headers=headers, --> 600 chunked=chunked) 601

E:\anaconda\lib\site-packages\urllib3\connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 342 try: --> 343 self._validate_conn(conn) 344 except (SocketTimeout, BaseSSLError) as e:

E:\anaconda\lib\site-packages\urllib3\connectionpool.py in _validate_conn(self, conn) 838 if not getattr(conn, 'sock', None): # AppEngine might not have .sock --> 839 conn.connect() 840

E:\anaconda\lib\site-packages\urllib3\connection.py in connect(self) 300 # Add certificate verification --> 301 conn = self._new_conn() 302 hostname = self.host

E:\anaconda\lib\site-packages\urllib3\connection.py in _new_conn(self) 167 raise NewConnectionError( --> 168 self, "Failed to establish a new connection: %s" % e) 169

NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x0CF27750>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

During handling of the above exception, another exception occurred:

timeout Traceback (most recent call last) E:\anaconda\lib\site-packages\geemap\geemap.py in ee_initialize(token_name) 36 ---> 37 ee.Initialize() 38 except:

E:\anaconda\lib\site-packages\ee_init_.py in Initialize(credentials, opt_url, use_cloud_api, cloud_api_key, http_transport, project) 122 project=project, --> 123 http_transport=http_transport) 124 # Initialize the dynamically loaded functions on the objects that want them.

E:\anaconda\lib\site-packages\ee\data.py in initialize(credentials, api_base_url, tile_base_url, use_cloud_api, cloud_api_base_url, cloud_api_key, project, http_transport) 209 --> 210 _install_cloud_api_resource() 211

E:\anaconda\lib\site-packages\ee\data.py in _install_cloud_api_resource() 286 response_inspector=_handle_profiling_response, --> 287 http_transport=_http_transport) 288

E:\anaconda\lib\site-packages\ee_cloud_api_utils.py in build_cloud_resource(api_base_url, api_key, credentials, timeout, headers_supplier, response_inspector, http_transport, raw) 148 requestBuilder=request_builder, --> 149 model=alt_model) 150 return resource

E:\anaconda\lib\site-packages\googleapiclient_helpers.py in positional_wrapper(*args, **kwargs) 133 logger.warning(message) --> 134 return wrapped(*args, **kwargs) 135

E:\anaconda\lib\site-packages\googleapiclient\discovery.py in build(serviceName, version, http, discoveryServiceUrl, developerKey, model, requestBuilder, credentials, cache_discovery, cache, client_options, adc_cert_path, adc_key_path, num_retries) 249 requested_url, discovery_http, cache_discovery, cache, --> 250 developerKey, num_retries=num_retries 251 )

E:\anaconda\lib\site-packages\googleapiclient\discovery.py in _retrieve_discovery_doc(url, http, cache_discovery, cache, developerKey, num_retries) 315 req = HttpRequest(http, HttpRequest.null_postproc, actual_url) --> 316 resp, content = req.execute(num_retries=num_retries) 317

E:\anaconda\lib\site-packages\googleapiclient_helpers.py in positional_wrapper(*args, **kwargs) 133 logger.warning(message) --> 134 return wrapped(*args, **kwargs) 135

E:\anaconda\lib\site-packages\googleapiclient\http.py in execute(self, http, num_retries) 900 body=self.body, --> 901 headers=self.headers, 902 )

E:\anaconda\lib\site-packages\googleapiclient\http.py in _retry_request(http, num_retries, req_type, sleep, rand, uri, method, *args, **kwargs) 203 if retry_num == num_retries: --> 204 raise exception 205 else:

E:\anaconda\lib\site-packages\googleapiclient\http.py in _retry_request(http, num_retries, req_type, sleep, rand, uri, method, *args, **kwargs) 176 exception = None --> 177 resp, content = http.request(uri, method, *args, **kwargs) 178 # Retry on SSL errors and socket timeout errors.

E:\anaconda\lib\site-packages\google_auth_httplib2.py in request(self, uri, method, body, headers, **kwargs) 189 self.credentials.before_request( --> 190 self._request, method, uri, request_headers) 191

E:\anaconda\lib\site-packages\google\auth\credentials.py in before_request(self, request, method, url, headers) 132 if not self.valid: --> 133 self.refresh(request) 134 self.apply(headers)

E:\anaconda\lib\site-packages\google\oauth2\credentials.py in refresh(self, request) 197 self._client_secret, --> 198 self._scopes, 199 )

E:\anaconda\lib\site-packages\google\oauth2_client.py in refresh_grant(request, token_uri, refresh_token, client_id, client_secret, scopes) 247 --> 248 response_data = _token_endpoint_request(request, token_uri, body) 249

E:\anaconda\lib\site-packages\google\oauth2_client.py in _token_endpoint_request(request, token_uri, body) 104 while True: --> 105 response = request(method="POST", url=token_uri, headers=headers, body=body) 106 response_body = (

E:\anaconda\lib\site-packages\google_auth_httplib2.py in call(self, url, method, body, headers, timeout, **kwargs) 116 response, data = self.http.request( --> 117 url, method=method, body=body, headers=headers, **kwargs) 118 return _Response(response, data)

E:\anaconda\lib\site-packages\httplib2_init_.py in request(self, uri, method, body, headers, redirections, connection_type) 1993 redirections, -> 1994 cachekey, 1995 )

E:\anaconda\lib\site-packages\httplib2_init_.py in _request(self, conn, host, absolute_uri, request_uri, method, body, headers, redirections, cachekey) 1650 (response, content) = self._conn_request( -> 1651 conn, request_uri, method, body, headers 1652 )

E:\anaconda\lib\site-packages\httplib2shim_init_.py in _conn_request(self, conn, request_uri, method, body, headers) 153 except Exception as e: --> 154 raise _map_exception(e) 155

timeout: timed out

During handling of the above exception, another exception occurred:

timeout Traceback (most recent call last) in ----> 1 geemap.ee_search()

E:\anaconda\lib\site-packages\geemap\geemap.py in ee_search(asset_limit) 5059 display(search_widget) 5060 -> 5061 repo_tree, repo_output, _ = build_repo_tree() 5062 left_widget.children = [search_type, repo_tree] 5063 right_widget.children = [repo_output]

E:\anaconda\lib\site-packages\geemap\geemap.py in build_repo_tree(out_dir, name) 5307 } 5308 -> 5309 user_id = ee_user_id() 5310 if user_id is not None: 5311 URLs['Owner'] = 'https://earthengine.googlesource.com/{}/default'.format(

E:\anaconda\lib\site-packages\geemap\geemap.py in ee_user_id() 5149 str: A string containing the user id. 5150 """ -> 5151 ee_initialize() 5152 roots = ee.data.getAssetRoots() 5153 if len(roots) == 0:

E:\anaconda\lib\site-packages\geemap\geemap.py in ee_initialize(token_name) 38 except: 39 ee.Authenticate() ---> 40 ee.Initialize() 41 42

E:\anaconda\lib\site-packages\ee_init_.py in Initialize(credentials, opt_url, use_cloud_api, cloud_api_key, http_transport, project) 121 cloud_api_key=cloud_api_key, 122 project=project, --> 123 http_transport=http_transport) 124 # Initialize the dynamically loaded functions on the objects that want them. 125 ApiFunction.initialize()

E:\anaconda\lib\site-packages\ee\data.py in initialize(credentials, api_base_url, tile_base_url, use_cloud_api, cloud_api_base_url, cloud_api_key, project, http_transport) 208 _http_transport = http_transport 209 --> 210 _install_cloud_api_resource() 211 212 if project is not None:

E:\anaconda\lib\site-packages\ee\data.py in _install_cloud_api_resource() 285 headers_supplier=_make_request_headers, 286 response_inspector=_handle_profiling_response, --> 287 http_transport=_http_transport) 288 289 _cloud_api_resource_raw = _cloud_api_utils.build_cloud_resource(

E:\anaconda\lib\site-packages\ee_cloud_api_utils.py in build_cloud_resource(api_base_url, api_key, credentials, timeout, headers_supplier, response_inspector, http_transport, raw) 147 http=http_transport, 148 requestBuilder=request_builder, --> 149 model=alt_model) 150 return resource 151

E:\anaconda\lib\site-packages\googleapiclient_helpers.py in positional_wrapper(*args, **kwargs) 132 elif positional_parameters_enforcement == POSITIONAL_WARNING: 133 logger.warning(message) --> 134 return wrapped(*args, **kwargs) 135 136 return positional_wrapper

E:\anaconda\lib\site-packages\googleapiclient\discovery.py in build(serviceName, version, http, discoveryServiceUrl, developerKey, model, requestBuilder, credentials, cache_discovery, cache, client_options, adc_cert_path, adc_key_path, num_retries) 248 content = _retrieve_discovery_doc( 249 requested_url, discovery_http, cache_discovery, cache, --> 250 developerKey, num_retries=num_retries 251 ) 252 return build_from_document(

E:\anaconda\lib\site-packages\googleapiclient\discovery.py in _retrieve_discovery_doc(url, http, cache_discovery, cache, developerKey, num_retries) 314 # Note that it will already raise an error if we don't get a 2xx response 315 req = HttpRequest(http, HttpRequest.null_postproc, actual_url) --> 316 resp, content = req.execute(num_retries=num_retries) 317 318 try:

E:\anaconda\lib\site-packages\googleapiclient_helpers.py in positional_wrapper(*args, **kwargs) 132 elif positional_parameters_enforcement == POSITIONAL_WARNING: 133 logger.warning(message) --> 134 return wrapped(*args, **kwargs) 135 136 return positional_wrapper

E:\anaconda\lib\site-packages\googleapiclient\http.py in execute(self, http, num_retries) 899 method=str(self.method), 900 body=self.body, --> 901 headers=self.headers, 902 ) 903

E:\anaconda\lib\site-packages\googleapiclient\http.py in _retry_request(http, num_retries, req_type, sleep, rand, uri, method, *args, **kwargs) 202 if exception: 203 if retry_num == num_retries: --> 204 raise exception 205 else: 206 continue

E:\anaconda\lib\site-packages\googleapiclient\http.py in _retry_request(http, num_retries, req_type, sleep, rand, uri, method, *args, **kwargs) 175 try: 176 exception = None --> 177 resp, content = http.request(uri, method, *args, **kwargs) 178 # Retry on SSL errors and socket timeout errors. 179 except _ssl_SSLError as ssl_error:

E:\anaconda\lib\site-packages\google_auth_httplib2.py in request(self, uri, method, body, headers, **kwargs) 188 189 self.credentials.before_request( --> 190 self._request, method, uri, request_headers) 191 192 # Check if the body is a file-like stream, and if so, save the body

E:\anaconda\lib\site-packages\google\auth\credentials.py in before_request(self, request, method, url, headers) 131 # the http request.) 132 if not self.valid: --> 133 self.refresh(request) 134 self.apply(headers) 135

E:\anaconda\lib\site-packages\google\oauth2\credentials.py in refresh(self, request) 196 self._client_id, 197 self._client_secret, --> 198 self._scopes, 199 ) 200

E:\anaconda\lib\site-packages\google\oauth2_client.py in refresh_grant(request, token_uri, refresh_token, client_id, client_secret, scopes) 246 body["scope"] = " ".join(scopes) 247 --> 248 response_data = _token_endpoint_request(request, token_uri, body) 249 250 try:

E:\anaconda\lib\site-packages\google\oauth2_client.py in _token_endpoint_request(request, token_uri, body) 103 # occurs. 104 while True: --> 105 response = request(method="POST", url=token_uri, headers=headers, body=body) 106 response_body = ( 107 response.data.decode("utf-8")

E:\anaconda\lib\site-packages\google_auth_httplib2.py in call(self, url, method, body, headers, timeout, **kwargs) 115 _LOGGER.debug('Making request: %s %s', method, url) 116 response, data = self.http.request( --> 117 url, method=method, body=body, headers=headers, **kwargs) 118 return _Response(response, data) 119 # httplib2 should catch the lower http error, this is a bug and

E:\anaconda\lib\site-packages\httplib2_init_.py in request(self, uri, method, body, headers, redirections, connection_type) 1992 headers, 1993 redirections, -> 1994 cachekey, 1995 ) 1996 except Exception as e:

E:\anaconda\lib\site-packages\httplib2_init_.py in _request(self, conn, host, absolute_uri, request_uri, method, body, headers, redirections, cachekey) 1649 1650 (response, content) = self._conn_request( -> 1651 conn, request_uri, method, body, headers 1652 ) 1653

E:\anaconda\lib\site-packages\httplib2shim_init_.py in _conn_request(self, conn, request_uri, method, body, headers) 152 153 except Exception as e: --> 154 raise _map_exception(e) 155 156 return response, content

timeout: timed out

WHU-Lavine avatar Aug 23 '20 15:08 WHU-Lavine