Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to use GEE in RDT #275

Open
12rambau opened this issue Sep 13, 2021 · 1 comment
Open

Impossible to use GEE in RDT #275

12rambau opened this issue Sep 13, 2021 · 1 comment
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@12rambau
Copy link
Member

When I build the documentation locally there are no problems.
When I build it with RDT i get the following errors coming from jupyter-sphinx:

[0;31m--------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) /tmp/ipykernel_244/3861035409.py in 1 from sepal_ui import mapping as sm 2 ----> 3 sm.SepalMap() ~/checkouts/readthedocs.org/user_builds/sepal-ui/envs/latest/lib/python3.7/site-packages/sepal_ui/mapping/mapping.py in init(self, basemaps, dc, vinspector, gee, **kwargs) 65 # init ee 66 self.ee = gee ---> 67 if gee: su.init_ee() 68 69 # init the rasters ~/checkouts/readthedocs.org/user_builds/sepal-ui/envs/latest/lib/python3.7/site-packages/sepal_ui/scripts/utils.py in init_ee() 142 # decrypt the key 143 json_encrypted = Path(file).parent/'encrypted_key.json' --> 144 with json_encrypted.open('rb') as f: 145 json_decripted = fernet.decrypt(f.read()).decode() 146 ~/.pyenv/versions/3.7.9/lib/python3.7/pathlib.py in open(self, mode, buffering, encoding, errors, newline) 1206 self._raise_closed() 1207 return io.open(self, mode, buffering, encoding, errors, newline, -> 1208 opener=self._opener) 1209 1210 def read_bytes(self): ~/.pyenv/versions/3.7.9/lib/python3.7/pathlib.py in _opener(self, name, flags, mode) 1061 def _opener(self, name, flags, mode=0o666): 1062 # A stub for the opener argument to built-in open() -> 1063 return self._accessor.open(self, flags, mode) 1064 1065 def _raw_open(self, flags, mode=0o777): FileNotFoundError: [Errno 2] No such file or directory: '/home/docs/checkouts/readthedocs.org/user_builds/sepal-ui/envs/latest/lib/python3.7/site-packages/sepal_ui/scripts/encrypted_key.json' Extension error: Cell raised uncaught exception: --------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) /tmp/ipykernel_244/3861035409.py in 1 from sepal_ui import mapping as sm 2 ----> 3 sm.SepalMap() ~/checkouts/readthedocs.org/user_builds/sepal-ui/envs/latest/lib/python3.7/site-packages/sepal_ui/mapping/mapping.py in init(self, basemaps, dc, vinspector, gee, **kwargs) 65 # init ee 66 self.ee = gee ---> 67 if gee: su.init_ee() 68 69 # init the rasters ~/checkouts/readthedocs.org/user_builds/sepal-ui/envs/latest/lib/python3.7/site-packages/sepal_ui/scripts/utils.py in init_ee() 142 # decrypt the key 143 json_encrypted = Path(file).parent/'encrypted_key.json' --> 144 with json_encrypted.open('rb') as f: 145 json_decripted = fernet.decrypt(f.read()).decode() 146 ~/.pyenv/versions/3.7.9/lib/python3.7/pathlib.py in open(self, mode, buffering, encoding, errors, newline) 1206 self._raise_closed() 1207 return io.open(self, mode, buffering, encoding, errors, newline, -> 1208 opener=self._opener) 1209 1210 def read_bytes(self): ~/.pyenv/versions/3.7.9/lib/python3.7/pathlib.py in _opener(self, name, flags, mode) 1061 def _opener(self, name, flags, mode=0o666): 1062 # A stub for the opener argument to built-in open() -> 1063 return self._accessor.open(self, flags, mode) 1064 1065 def _raw_open(self, flags, mode=0o777): FileNotFoundError: [Errno 2] No such file or directory: '/home/docs/checkouts/readthedocs.org/user_builds/sepal-ui/envs/latest/lib/python3.7/site-packages/sepal_ui/scripts/encrypted_key.json'

(https://readthedocs.org/projects/sepal-ui/builds/14700568/).

It seems like the builder doesn't catch the .json file. even though it has been added to the package data in setup.py in 3c7cca2.

I think I will prevent the use of gee in the doc everywhere I can until I found a solution.

@12rambau 12rambau added bug Something isn't working documentation Improvements or additions to documentation labels Sep 13, 2021
@12rambau
Copy link
Member Author

It's the same as in the test. Everything that is calling EarthEngine uses the credential of the comunity account. so it has no asset folder. The folder needs to be manually set for every single tools: i.e. AoiTile, AoiView, ReclassifyTile... etc

@12rambau 12rambau pinned this issue Nov 21, 2021
@12rambau 12rambau unpinned this issue Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant