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

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

Open
angelXmonster opened this issue Nov 27, 2024 · 1 comment
Open

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

angelXmonster opened this issue Nov 27, 2024 · 1 comment

Comments

@angelXmonster
Copy link

angelXmonster commented Nov 27, 2024

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?

@Kislam0505
Copy link

I am having the same issue

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