ohdsi-studies / Covid19SubjectsAesiIncidenceRate

Extending on our previous work by Li et al. in understanding the incidence rates of adverse events of special interest (AESI) for COVID-19, this work will look at the rates of these AESIs in patients who had COVDI-19 disease.
https://ohdsi-studies.github.io/Covid19SubjectsAesiIncidenceRate/Protocol.html
2 stars 4 forks source link

cyclic namespace dependency detected when loading ‘dplyr’ #15

Closed ericaVoss closed 2 years ago

ericaVoss commented 2 years ago

Getting this error when trying to build the last cohort (TWT #547). It must be hitting the issue here: https://github.com/ohdsi-studies/Covid19SubjectsAesiIncidenceRate/blob/b67d3ef931f2750ed5029eeafb71c0a92d8029f5/R/CohortConstruction.R#L158-L188

Thread: Main
Message:  cyclic namespace dependency detected when loading ‘dplyr’, already loading ‘dbplyr’, ‘dplyr’, ‘CohortDiagnostics’
Level:  FATAL
Time:  2021-12-28 10:32:35

Stack trace:
16: logFatal(gsub("\n", " ", geterrmessage()))
15: (function () 
{
    logFatal(gsub("\n", " ", geterrmessage()))
    if (!is.null(previousErrorHandler)) {
        eval(previousErrorHandler)
    }
})()
14: as.list(desc)
13: FUN(X[[i]], ...)
12: lapply(loadedOnly, packageDescription)
11: sessionInfo()
10: .systemInfo()
9: .createErrorReport(connection@dbms, err$message, sqlStatement, errorReportFile)
8: value[[3]](cond)
7: tryCatchOne(expr, names, parentenv, handlers[[1]])
6: tryCatchList(expr, classes, parentenv, handlers)
5: tryCatch({
    startQuery <- Sys.time()
    lowLevelExecuteSql(connection, sqlStatement)
    if (profile) {
        delta <- Sys.time() - startQuery
        inform(p
4: CohortConstruction.R#180: DatabaseConnector::executeSql(connection, sql)
3: createCohortsAndRef.R#139: instantiateCohortSet(connectionDetails = connectionDetails, connection = connection, cdmDatabaseSchema = cdmDatabaseSchema, tempEmulationS
2: Main.R#68: createCohortsAndRef(connectionDetails = connectionDetails, cdmDatabaseSchema = cdmDatabaseSchema, cohortDatabaseSchema = cohortDatabaseSchema, cohortTable
1: Covid19SubjectsAesiIncidenceRate::execute(connectionDetails = connectionDetails, outputFolder = outputFolder, cdmDatabaseSchema = cdmDatabaseSchema, cohortDatabaseSc

R version:
R version 4.0.3 (2020-10-10)

Platform:
x86_64-w64-mingw32

Attached base packages:
- stats
- graphics
- grDevices
- datasets
- utils
- methods
- base

Other attached packages:
- stats
- graphics
- grDevices
- datasets
- utils
- methods
- base

Other attached packages:
- Covid19SubjectsAesiIncidenceRate (1.2.4)

Tagging @filipmaljkovic

ericaVoss commented 2 years ago

We believe this doesn't have to do with dplyr, rather the DB is bombing building the TWT cohorts. Trying to troubleshoot by tuning the DB.

ericaVoss commented 2 years ago

Indexing did let us get to the end.