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

rgeeExtra - "has no attribute" error #10

Closed
GReimche opened this issue Aug 19, 2023 · 3 comments
Closed

rgeeExtra - "has no attribute" error #10

GReimche opened this issue Aug 19, 2023 · 3 comments

Comments

@GReimche
Copy link

GReimche commented Aug 19, 2023

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.

@GReimche GReimche changed the title rgeeExtra dependencies rgeeExtra - "has no attribute" error Aug 19, 2023
@csaybar
Copy link
Member

csaybar commented Aug 20, 2023

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

@GReimche
Copy link
Author

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 ?

@GReimche
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants