r-earthengine/rgeeExtra

rgeeExtra - "has no attribute" error

Closed this issue · 3 comments

Hi csaybar,

I can not make it to work, every time I tried I get this kind of error. rgee works great.

Error in py_get_attr_impl(x, name, silent) :
AttributeError: type object 'Image' has no attribute 'getDOI'
Run reticulate::py_last_error() for details.

I's like so with other like "spectralIndex" e.g
Are there any python dependencies for rgeeExtra to work?. Do you have any idea of what is the problem.

Hi @GReimche sorry we make a lot of changes to the package. Did you try downloading the latest version?.

Hi csaybar!
I'm struggling with this error.

`> S2 <- ee$Image("COPERNICUS/S2_SR/20240201T133141_20240201T133141_T22HBK") %>%

  • ee$Image$Extra_spectralIndex(c("NDVI", "SAVI"))
    Error in py_get_attr_impl(x, name, silent) :
    AttributeError: type object 'Image' has no attribute 'Extra_spectralIndex'
    Run reticulate::py_last_error() for details.`

`> reticulate::py_last_error()

── Python Exception Message ─────────────────────────────────────────────────────────────────────────────────────────
AttributeError: type object 'Image' has no attribute 'Extra_spectralIndex'

── R Traceback ──────────────────────────────────────────────────────────────────────────────────────────────────────

  1. ├─... %>% ee$Image$Extra_spectralIndex(c("NDVI", "SAVI"))
  2. ├─ee$Image$Extra_spectralIndex
  3. └─reticulate:::$.python.builtin.object(ee$Image, Extra_spectralIndex)
  4. └─reticulate:::py_get_attr_or_item(x, name, TRUE)
  5. └─reticulate::py_get_attr(x, name)
    
  6.   └─reticulate:::py_get_attr_impl(x, name, silent)`
    

All, R libraries and python packages are up to date.
Could you please help me ?

I just found my error. I forgot do run extra_Initialize() before running the code.