Giter Site home page Giter Site logo

Comments (3)

douglagug avatar douglagug commented on August 20, 2024

shows a table of my system and gee map versioning

from geemap.

giswqs avatar giswqs commented on August 20, 2024

See #1870 (comment)

from geemap.

douglagug avatar douglagug commented on August 20, 2024

this is the error I get after adding the Google verification code
PermissionError Traceback (most recent call last)
File /opt/miniconda3/envs/gee/lib/python3.8/site-packages/ee/oauth.py:177, in write_private_json(json_path, info_dict)
176 try:
--> 177 os.makedirs(dirname)
178 except OSError as e:

File /opt/miniconda3/envs/gee/lib/python3.8/os.py:223, in makedirs(name, mode, exist_ok)
222 try:
--> 223 mkdir(name, mode)
224 except OSError:
225 # Cannot rely on checking for EEXIST, since the operating system
226 # could give priority to other errors like EACCES or EROFS

PermissionError: [Errno 13] Permission denied: '/Users/douglasgray/.config/earthengine'

During handling of the above exception, another exception occurred:

Exception Traceback (most recent call last)
Cell In[3], line 1
----> 1 m = geemap.Map()
2 m

File /opt/miniconda3/envs/gee/lib/python3.8/site-packages/geemap/geemap.py:121, in Map.init(self, **kwargs)
119 self._USER_AGENT_PREFIX = "geemap"
120 self.kwargs = kwargs
--> 121 super().init(**kwargs)
122 self._var_name = "Map" # The Map variable name for converting JS to Python
124 if kwargs.get("height"):

File /opt/miniconda3/envs/gee/lib/python3.8/site-packages/geemap/core.py:494, in Map.init(self, **kwargs)
492 # Authenticate and initialize EE.
493 if kwargs.get("ee_initialize", True):
--> 494 common.ee_initialize(user_agent_prefix=self._USER_AGENT_PREFIX)
496 # Listen for layers being added/removed so we can update the layer manager.
497 self.observe(self._on_layers_change, "layers")

File /opt/miniconda3/envs/gee/lib/python3.8/site-packages/geemap/common.py:154, in ee_initialize(token_name, auth_mode, service_account, auth_args, user_agent_prefix, project, **kwargs)
151 ee.Initialize(**kwargs)
153 except Exception:
--> 154 ee.Authenticate(**auth_args)
155 ee.Initialize(**kwargs)
157 ee.data.setUserAgent(user_agent)

File /opt/miniconda3/envs/gee/lib/python3.8/site-packages/ee/init.py:124, in Authenticate(authorization_code, quiet, code_verifier, auth_mode, scopes, force)
93 def Authenticate(
94 authorization_code: Optional[str] = None,
95 quiet: Optional[bool] = None,
(...)
99 force: bool = False,
100 ) -> Optional[bool]:
101 """Prompts the user to authorize access to Earth Engine via OAuth2.
102
103 Args:
(...)
122 True if we found valid credentials and didn't run the auth flow.
123 """
--> 124 return oauth.authenticate(authorization_code, quiet, code_verifier, auth_mode,
125 scopes, force)

File /opt/miniconda3/envs/gee/lib/python3.8/site-packages/ee/oauth.py:512, in authenticate(cli_authorization_code, quiet, cli_code_verifier, auth_mode, scopes, force)
509 if flow.display_instructions(quiet):
510 _open_new_browser(flow.auth_url)
--> 512 flow.save_code()

File /opt/miniconda3/envs/gee/lib/python3.8/site-packages/ee/oauth.py:562, in Flow.save_code(self, code)
560 redirect_uri = self.server.url
561 code = self.server.fetch_code() # Waits for oauth callback
--> 562 _obtain_and_write_token(code, self.code_verifier, self.scopes, redirect_uri)

File /opt/miniconda3/envs/gee/lib/python3.8/site-packages/ee/oauth.py:247, in _obtain_and_write_token(auth_code, code_verifier, scopes, redirect_uri)
245 client_info['refresh_token'] = token
246 client_info['scopes'] = scopes
--> 247 write_private_json(get_credentials_path(), client_info)
248 print('\nSuccessfully saved authorization token.')

File /opt/miniconda3/envs/gee/lib/python3.8/site-packages/ee/oauth.py:181, in write_private_json(json_path, info_dict)
178 except OSError as e:
179 if e.errno != errno.EEXIST:
180 # pylint:disable=broad-exception-raised,raise-missing-from
--> 181 raise Exception('Error creating directory %s: %s' % (dirname, e))
182 # pylint:enable=broad-exception-raised,raise-missing-from
184 file_content = json.dumps(info_dict)

Exception: Error creating directory /Users/douglasgray/.config/earthengine: [Errno 13] Permission denied: '/Users/douglasgray/.config/earthengine'

from geemap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.