CohortDiagnostics icon indicating copy to clipboard operation
CohortDiagnostics copied to clipboard

CohortDiagnostics - R Shiny app does not generate any results when generate table is selected under cohort characterization

Open ssivarama opened this issue 1 year ago • 9 comments

Hi,

After launching the R shiny app using launchDiagnosticsExplorer, when I click on the generate table from the cohort characterization tab, I am seeing the following error

Warning: Error in rJava::.jcall: RcallMethod: cannot determine object class 166: rJava::.jcall 165: supportsJava8 164: SqlRender::render 163: renderTranslateQuerySql [R/ResultRetrieval.R#11] 162: getResultsTemporalTimeRef [R/ResultRetrieval.R#1192] 161: getCharacterizationOutput [R/ResultRetrieval.R#215] 160: [R/CharacterizationModule.R#423] 144: characterizationOutput 143: eventReactiveValueFunc [R/CharacterizationModule.R#482] 99: cohortCharacterizationPrettyTable 98: :: htmlwidgets shinyRenderWidget [R/CharacterizationModule.R#557] 97: func 84: renderFunc 83: output$DiagnosticsExplorer-characterization-characterizationTable 2: shiny::runApp 1: CohortDiagnostics::launchDiagnosticsExplorer rshiny_app_characterization_error

Can you please help in resolving this issue. Thanks.

ssivarama avatar Apr 11 '23 17:04 ssivarama

I'm wondering if this is a data model problem. Did you run in to any issues when generating either the results schema or the results themselves?

azimov avatar Apr 13 '23 22:04 azimov

I didn't see any errors while generating the results. I could see the counts in the Cohort Counts section.

ssivarama avatar Apr 13 '23 22:04 ssivarama

Does this issue persist if you update to the latest verion of cohort diagnostics/OhdsiShinyModules:

remotes::install_github("ohdsi/CohortDiagnostics")
remotes::install_github("ohdsi/OhdsiShinyModules")
# RESTART R session here!
CohortDiagnostics::launchDiagnosticsExplorer()

azimov avatar Apr 18 '23 01:04 azimov

Hi @azimov, I have the latest versions of both packages and there were no errors when executing CohortDiagnostics. I still have the same issue as reported here. @ssivarama, could you please share whether you solved the issue?

carmenOT avatar Jul 28 '23 14:07 carmenOT

@carmenOT are you using an sqlite database or postgres to host your results? This might be an issue with an underlying library but its hard to tell from this error message

azimov avatar Jul 28 '23 14:07 azimov

It's Postgres (Redshift), I am using the Diagnostics Explorer with the following functions:

createMergedResultsFile("C:/temp/allZipFiles", sqliteDbPath = "MyCohortDiagnosticsResulst.sqlite")

launchDiagnosticsExplorer(sqliteDbPath = "MyCohortDiagnosticsResulst.sqlite")

Do you think I should use something different? @azimov

carmenOT avatar Jul 28 '23 15:07 carmenOT

@carmenOT this is difficult to diagnose.

The output of this tab has been changed significantly in the development release of our shiny package

Trying

remotes::install_github("ohdsi/ohdsiShinyModules", ref="develop")

May help (or at least produce a different error)

azimov avatar Aug 01 '23 18:08 azimov

Hi @azimov, I have the same error too, after reinstalling the latest and developer version of both packages.

Here's a more detailed error message if that helps:

launchDiagnosticsExplorer(sqliteDbPath = normalizePath('cohortdiagnostics_marketscan/MyResults.sqlite', winslash = "/", mustWork = NA)) # the sqlite file should be in the data folder if running on Rstudio
Loading required package: shiny
Connecting using SQLite driver

Listening on http://127.0.0.1:5406
Warning: Navigation containers expect a collection of `bslib::nav()`/`shiny::tabPanel()`s and/or `bslib::nav_menu()`/`shiny::navbarMenu()`s. Consider using `header` or `footer` if you wish to place content above (or below) every panel's contents.
Warning: Error in rJava::.jcall: RcallMethod: cannot determine object class                                                                                                                                                                                                             
  165: eval_tidy
  164: tibble_quos
  163: dplyr::tibble
  162: tidyr::replace_na
  160: <reactive>
  144: getPrettyCharacterizationData
  143: eventReactiveValueFunc
   99: cohortCharacterizationPrettyTable
   98: ::
htmlwidgets
shinyRenderWidget
   97: func
   84: renderFunc
   83: output$DiagnosticsExplorer-characterization-characterizationTable
    2: shiny::runApp
    1: launchDiagnosticsExplorer
<pool> Failed to activate and/or validate existing object.
<pool> Trying again with a new object.
Connecting using SQLite driver
Warning: Error in rJava::.jcall: RcallMethod: cannot determine object class
  146: <Anonymous>
  145: stop
  144: getPrettyCharacterizationData
  143: eventReactiveValueFunc
   99: cohortCharacterizationPrettyTable
   98: ::
htmlwidgets
shinyRenderWidget
   97: func
   84: renderFunc
   83: output$DiagnosticsExplorer-characterization-characterizationTable
    2: shiny::runApp
    1: launchDiagnosticsExplorer

lluo0 avatar Aug 01 '23 19:08 lluo0

@azimov Apologies for the delayed response. I initially had CohortDiagnostics 3.1.2 when I initially posted the issue. Based on your comments, I updated it to 3.2.3 but still the issue persists. The OMOP CDM data is on AWS Redshift. I am seeing the same error as posted by @lluo0 after installing the developer version.

ssivarama avatar Aug 02 '23 22:08 ssivarama