Skip to content

Commit

Permalink
Merge pull request #1119 from giswqs/python-310
Browse files Browse the repository at this point in the history
Added support for Python 3.10
  • Loading branch information
giswqs authored Jun 25, 2022
2 parents 7af06ad + bbd800b commit 796bf8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions geemap/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def ee_initialize(token_name="EARTHENGINE_TOKEN", auth_mode="notebook"):
token_name (str, optional): The name of the Earth Engine token. Defaults to "EARTHENGINE_TOKEN".
auth_mode (str, optional): The authentication mode, can be one of paste,notebook,gcloud,appdefault. Defaults to "notebook".
"""
import httplib2

if ee.data._credentials is None:
try:
Expand Down Expand Up @@ -184,10 +185,10 @@ def ee_initialize(token_name="EARTHENGINE_TOKEN", auth_mode="notebook"):
if is_drive_mounted():
copy_credentials_to_drive()

ee.Initialize()
ee.Initialize(http_transport=httplib2.Http())
except Exception:
ee.Authenticate(auth_mode=auth_mode)
ee.Initialize()
ee.Initialize(http_transport=httplib2.Http())


def set_proxy(port=1080, ip="http://127.0.0.1", timeout=300):
Expand Down

0 comments on commit 796bf8c

Please sign in to comment.