- 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