Earth Engine Reducer problem is being occurred on Jupyter (VSCode)

714 Views Asked by At

I am trying to deploy a Heroku app using GEE on Jupyter for VS Code. After I authenticated it, it is bouncing an AttributeError error. I have even tried downgrading the Google API client according to the geemap creator Dr. Wu, but it is not working. THose 3 lines code:

import ee
ee.Authenticate()
import geemap    
Map = geemap.Map()

Now, here is the error:

AttributeError                            Traceback (most recent call last)
e:\Work\Heroku\.geeapp\geemap-heroku\notebooks\geemap.ipynb Cell 3' in <cell line: 1>()
----> 1 Map = geemap.Map()

File c:\Users\AnirbanOne\AppData\Local\Programs\Python\Python310\lib\site-packages\geemap\geemap.py:165, in Map.__init__(self, **kwargs)
    163 self.roi_end = False
    164 if kwargs["ee_initialize"]:
--> 165     self.roi_reducer = ee.Reducer.mean()
    166 self.roi_reducer_scale = None
    168 # List for storing pixel values and locations based on user-drawn geometries.

AttributeError: module 'ee' has no attribute 'Reducer'

I tried these suggestions but failed-

https://github.com/giswqs/geemap/discussions/243 https://github.com/google/earthengine-api/issues/157

I am agonizing over the fact that I wasted 1 and half of a day after this without any solution. Am I being gravely wrong somewhere?

0

There are 0 best solutions below