openforis / sepal

Geographical Data Processing in the Cloud
https://sepal.io/
MIT License
207 stars 46 forks source link

Module Deforestation alert analysis won't start #325

Open moralesluciacr opened 4 weeks ago

moralesluciacr commented 4 weeks ago

Bug Description

Module Deforestation alert analysis won't start This is what you get when the model tries to load.

--------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
Cell In[1], line 2
      1 from sepal_ui.scripts.utils import init_ee
----> 2 init_ee()
      3 from sepal_ui import sepalwidgets as sw
      5 from component.message import cm

File /usr/local/share/jupyter/kernels/venv-alert_module/venv/lib/python3.10/site-packages/sepal_ui/scripts/utils.py:154, in init_ee()
    151     credential_file_path.write_text(ee_token)
    153 # Extract the project name from credentials
--> 154 _credentials = json.loads(credential_file_path.read_text())
    155 project_id = _credentials.get("project_id", _credentials.get("project", None))
    157 if not project_id:

File /usr/lib/python3.10/pathlib.py:1134, in Path.read_text(self, encoding, errors)
   1130 """
   1131 Open the file in text mode, read it, and close the file.
   1132 """
   1133 encoding = io.text_encoding(encoding)
-> 1134 with self.open(mode='r', encoding=encoding, errors=errors) as f:
   1135     return f.read()

File /usr/lib/python3.10/pathlib.py:1119, in Path.open(self, mode, buffering, encoding, errors, newline)
   1117 if "b" not in mode:
   1118     encoding = io.text_encoding(encoding)
-> 1119 return self._accessor.open(self, mode, buffering, encoding, errors,
   1120                            newline)

FileNotFoundError: [Errno 2] No such file or directory: '/home/sepal-user/.config/earthengine/credentials'

To Reproduce

Steps to reproduce the behavior:

  1. Launch sepal
  2. Start the modules and select Deforestation alerts analysis module

Expected behavior

A map of the world should display including a menu to report issues

Screenshots See bug description

cdanielw commented 4 weeks ago

The fact that /home/sepal-user/.config/earthengine/credentials isn't found indicates that you have not successfully connected your Google Account to SEPAL. You can read up on doing that here. Even if you are properly connected, try to disconnect and reconnect.