Skip to content

Commit caef4c9

Browse files
committed
adjusted config
1 parent 4d7c79a commit caef4c9

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

R/config.R

+3-6
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,9 @@ config <- function(python = NA, required = T){
2727
print(py_config())
2828
cat("\n")
2929

30-
dc <- try(import("datacube"), silent = T)
31-
32-
if(inherits(dc, "try-error")){
33-
out("Python library 'datacube' cannot be loaded. Did you specify the correct Python binary/environment? Is the 'datacube' module installed for this Python binary/environment and working? Are its upstream dependencies installed? To set up a datacube environment ready for Pyhton and R 'out of the box', please see https://github.com/eo2cube/odcbox", type = 3)
30+
if(.dc_available()){
31+
out(paste0("Linking to datacube ", .dc_version(), ", 'odcr' configuration successfull."))
3432
} else{
35-
v <- dc$"__version__"
36-
out(paste0("Linking to datacube ", v, ", 'odcr' configuration successfull."))
33+
out("Python library 'datacube' cannot be loaded. Did you specify the correct Python binary/environment? Is the 'datacube' module installed for this Python binary/environment and working? Are its upstream dependencies installed? To set up a datacube environment ready for Pyhton and R 'out of the box', please see https://github.com/eo2cube/odcbox", type = 3)
3734
}
3835
}

0 commit comments

Comments
 (0)