sepal-contrib / sdg_15.3.1

monitor SDG indicators at plot level
MIT License
3 stars 4 forks source link

Error loading data from GEE Legacy assets #129

Closed Kinga-11 closed 8 months ago

Kinga-11 commented 8 months ago

Hello!

When I try to run SDG 15.3.1, I encounter the following error: I am not able to load data from GEE-Legacy assets, and my cloud assets are empty. How can I fix this error? I have tried to stop and start a new Sepal instance, but it did not fix the error. Thank you!

IndexError Traceback (most recent call last) Cell In[8], line 1 ----> 1 reclassify_tile = tile.ReclassifyTile(aoi_model=aoi_tile.view.model)

File ~/shared/apps/sdg_15.3.1/component/tile/reclassify_tile.py:8, in ReclassifyTile.init(self, aoi_model) 7 def init(self, aoi_model: AoiModel): ----> 8 super().init( 9 gee=True, 10 default_class={"UNCCD CLASSES": str(cp.utils_dir / "UNCCD.csv")}, 11 save=True, 12 aoi_model=aoi_model, 13 ) 15 # change the title 16 self.title.children[0].children = ["Adapt Land Cover map"]

File ~/shared/apps/sdg_15.3.1/component/widget/reclassify/reclassify_view.py:362, in ReclassifyView.init(self, model, class_path, out_path, gee, dst_class, default_class, aoi_model, save, folder, enforce_aoi, kwargs) 359 super().init(kwargs) 361 # set up a default model --> 362 self.model = model or ReclassifyModel( 363 gee=gee, 364 dst_dir=out_path, 365 aoi_model=aoi_model, 366 folder=folder, 367 save=save, 368 enforce_aoi=enforce_aoi, 369 ) 371 if enforce_aoi != self.model.enforce_aoi: 372 raise Exception( 373 "Both reclassify_model.gee and reclassify_view parameters has to be equals." 374 + f"Received {enforce_aoi} for reclassify_view and {self.model.enforce_aoi} for reclassify_model." 375 )

File ~/shared/apps/sdg_15.3.1/component/widget/reclassify/reclassify_model.py:104, in ReclassifyModel.init(self, gee, dst_dir, aoi_model, folder, save, enforce_aoi, **kwargs) 101 su.init_ee() 103 if self.gee: --> 104 self.folder = folder or ee.data.getAssetRoots()[0]["id"] 105 else: 106 self.folder = None

IndexError: list index out of range

Kinga-11 commented 8 months ago

I fixed the error