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 DatabaseConnector::getTableNames(connectionHandler$getConnection(), : Pool, R6 connection not supported #295

Open
ablack3 opened this issue Jun 18, 2024 · 0 comments

Comments

@ablack3
Copy link

ablack3 commented Jun 18, 2024

I ran cohort diagnostics and have a folder with csv files.

I created the merged sqlite zip file.

Then I ran

CohortDiagnostics::launchDiagnosticsExplorer(here::here("MergedCohortDiagnosticsData.sqlite"))

and get the following error.

Error in DatabaseConnector::getTableNames(connectionHandler$getConnection(),  :    Pool, R6 connection not supported

I'm using the latest release of the Hades packages.

To reproduce this error I created a minimal reprex. These are the lines in the shiny module that cause the error.

remotes::install_github("OHDSI/DatabaseConnector")
#> Skipping install of 'DatabaseConnector' from a github remote, the SHA1 (bee58a31) has not changed since last install.
#>   Use `force = TRUE` to force installation
remotes::install_github("OHDSI/ResultModelManager")
#> Skipping install of 'ResultModelManager' from a github remote, the SHA1 (ad706b43) has not changed since last install.
#>   Use `force = TRUE` to force installation

connectionDetails <- DatabaseConnector::createConnectionDetails("sqlite", server = ":memory:")

connectionHandler <- ResultModelManager::PooledConnectionHandler$new(connectionDetails)
#> Using DatabaseConnector jdbc driver.
#> Initalizing pooled connection
#> Connecting using SQLite driver

DatabaseConnector::getTableNames(connectionHandler$getConnection(), databaseSchema = "main")
#> Error in `DatabaseConnector::getTableNames()`:
#> ! Pool, R6 connection not supported
connectionHandler$closeConnection()

sessionInfo()
#> R version 4.3.1 (2023-06-16)
#> Platform: aarch64-apple-darwin20 (64-bit)
#> Running under: macOS Sonoma 14.0
#> 
#> Matrix products: default
#> BLAS:   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib 
#> LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0
#> 
#> locale:
#> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#> 
#> time zone: Europe/Amsterdam
#> tzcode source: internal
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] styler_1.10.3            utf8_1.2.4               generics_0.1.3          
#>  [4] RSQLite_2.3.6            hms_1.1.3                digest_0.6.35           
#>  [7] magrittr_2.0.3           evaluate_0.23            fastmap_1.1.1           
#> [10] blob_1.2.4               R.oo_1.26.0              DatabaseConnector_6.3.2 
#> [13] R.cache_0.16.0           R.utils_2.12.3           backports_1.5.0         
#> [16] DBI_1.2.2                purrr_1.0.2              fansi_1.0.6             
#> [19] cli_3.6.2                rlang_1.1.4              R.methodsS3_1.8.2       
#> [22] bit64_4.0.5              reprex_2.1.0             remotes_2.5.0           
#> [25] withr_3.0.0              cachem_1.0.8             yaml_2.3.8              
#> [28] tools_4.3.1              ParallelLogger_3.3.0     tzdb_0.4.0              
#> [31] memoise_2.0.1            checkmate_2.3.1          dplyr_1.1.4             
#> [34] SqlRender_1.18.1         curl_5.2.1               vctrs_0.6.5             
#> [37] R6_2.5.1                 lifecycle_1.0.4          pool_1.0.3              
#> [40] fs_1.6.4                 bit_4.0.5                ResultModelManager_0.5.8
#> [43] pkgconfig_2.0.3          rJava_1.0-11             pillar_1.9.0            
#> [46] later_1.3.2              glue_1.7.0               Rcpp_1.0.12             
#> [49] xfun_0.43                tibble_3.2.1             tidyselect_1.2.1        
#> [52] rstudioapi_0.16.0        knitr_1.45               htmltools_0.5.8.1       
#> [55] rmarkdown_2.26           readr_2.1.5              compiler_4.3.1

Created on 2024-06-18 with reprex v2.1.0

references in the code:

Connection handler is created here:
https://github.com/OHDSI/CohortDiagnostics/blob/03c40ab06832a329f2c904fbd686a0596ea9af6f/inst/shiny/DiagnosticsExplorer/global.R#L82

getTableNames is called here:
https://github.com/OHDSI/OhdsiShinyModules/blob/42f5bb42c731fd9ff1a9c96bb68b624fd357ba78/R/cohort-diagnostics-main.R#L27C3-L29C16

The error comes from the line above which is why I thought the issue should be in OhdsiShinyModules.

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

1 participant