Skip to content

Error in ee_check() validation (try to check string vs list) #373

Open
@angelXmonster

Description

@angelXmonster

https://github.com/r-spatial/rgee/blob/ea6a1f9b96999d3406b9fa91e66b5409dfec5652/R/ee_check.R#L62C19-L62C52

I was getting an error when using ee_check():

> ee_check()
◉  Python version
✔ [Ok] C:/Users/ANMOD4/AppData/Local/r-miniconda/envs/rgee_py/python.exe v3.12
Error in strsplit(a, "[.-]") : non-character argument

After taking a look into what could be the issue,
I found that:
py_version <- py_discover_config()[["version"]] #creates a list
Therefore, when using:

utils::compareVersion(py_version, "3.5") 
Error in strsplit(a, "[.-]") : non-character argument #it produces the error 

The issue is solved by simply setting the config version as a character, so it can compare the two strings:

py_version <- as.character(py_discover_config()[["version"]])

◉  Python version
✔ [Ok] C:/Users/ANMOD4/AppData/Local/r-miniconda/envs/rgee/python.exe v3.12
◉  Python packages:
✔ [Ok] numpy
✔ [Ok] earthengine-api

Is there a reason to use the version as a list instead of a string?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions