OHDSI Home | Forums | Wiki | Github

SOLVED - PLP error: Issue with json file

I’m in the middle of running a PLP study and have encountered this error:

Error in value[3L] : Issue with json file…

traceback()
6: stop(“Issue with json file…”) at Main.R#168
5: value[3L]
4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
3: tryCatchList(expr, classes, parentenv, handlers)
2: tryCatch({
Hydra::loadSpecifications(file = predictionAnalysisListFile)
}, error = function(cond) {
stop(“Issue with json file…”)
}) at Main.R#166
1: execute(connectionDetails = connectionDetails, cdmDatabaseSchema = cdmDatabaseSchema,
cdmDatabaseName = cdmDatabaseName, cohortDatabaseSchema = cohortDatabaseSchema,
cohortTable = cohortTable, outputFolder = outputFolder, createProtocol = F,
createCohorts = F, runAnalyses = F, createResultsDoc = F,
packageResults = F, createValidationPackage = T, minCellCount = 5,
createShiny = T, createJournalDocument = T, analysisIdDocument = 1)

If I turn off the createValidationPackage, I still get the same issue just in a new place in the Main file:

Error in value[3L] : Issue with json file…

traceback()
6: stop(“Issue with json file…”) at Main.R#195
5: value[3L]
4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
3: tryCatchList(expr, classes, parentenv, handlers)
2: tryCatch({
Hydra::loadSpecifications(file = predictionAnalysisListFile)
}, error = function(cond) {
stop(“Issue with json file…”)
}) at Main.R#193
1: execute(connectionDetails = connectionDetails, cdmDatabaseSchema = cdmDatabaseSchema,
cdmDatabaseName = cdmDatabaseName, cohortDatabaseSchema = cohortDatabaseSchema,
cohortTable = cohortTable, outputFolder = outputFolder, createProtocol = F,
createCohorts = F, runAnalyses = F, createResultsDoc = F,
packageResults = F, createValidationPackage = F, minCellCount = 5,
createShiny = T, createJournalDocument = T, analysisIdDocument = 1)

Thoughts? @jennareps @schuemie @SCYou

Alright, I re-installed Hydra which seemed to alleviate this particular issue… but now I have a new issue :crazy_face:

Error in class(plpData) %in% c(“plpData.libsvm”, “plpData.coo”, “plpData”) :
argument “plpData” is missing, with no default

6: class(plpData) %in% c(“plpData.libsvm”, “plpData.coo”, “plpData”)
5: createStudyPopulation(cohortId = 1247L, studyStartDate = “”,
studyEndDate = “”, attrition = list(description = 1:4, targetCount = c(77519L,
47055L, 46506L, 46506L), uniquePeople = c(77519L, 47055L,
46506L, 46506L), outcomes = c(1779L, 928L, 379L, 379L)),
outcomeId = 1246L, binary = TRUE, includeAllOutcomes = TRUE,
firstExposureOnly = FALSE, washoutPeriod = 180L, removeSubjectsWithPriorOutcome = TRUE,
priorOutcomeLookback = 99999L, requireTimeAtRisk = TRUE,
minTimeAtRisk = 364L, riskWindowStart = 1L, addExposureDaysToStart = FALSE,
riskWindowEnd = 1095L, addExposureDaysToEnd = FALSE)
4: do.call(“createStudyPopulation”, populationSet)
3: PatientLevelPrediction::createPlpJournalDocument(plpResult = res,
plpValidation = exVal, targetName = cohortNames[cohortIds ==
res$model$cohortId][1], outcomeName = cohortNames[cohortIds ==
res$model$outcomeId][1], plpData = NULL, table1 = F,
connectionDetails = NULL, includeTrain = T, includeTest = T,
includePredictionPicture = F, includeAttritionPlot = T, outputLocation = file.path(resultDirectory,
“plp_document.docx”)) at createDocument.R#66
2: createJournalDocument(resultDirectory = outputFolder, analysisId = analysisIdDocument,
includeValidation = T, cohortIds = pn$cohortDefinitions$id,
cohortNames = pn$cohortDefinitions$name) at Main.R#198
1: execute(connectionDetails = connectionDetails, cdmDatabaseSchema = cdmDatabaseSchema,
cdmDatabaseName = cdmDatabaseName, cohortDatabaseSchema = cohortDatabaseSchema,
cohortTable = cohortTable, outputFolder = outputFolder, createProtocol = F,
createCohorts = F, runAnalyses = F, createResultsDoc = F,
packageResults = F, createValidationPackage = T, minCellCount = 5,
createShiny = T, createJournalDocument = T, analysisIdDocument = 1)

“PLP is like a box of chocolates. You never know what you’re gonna get.” - Forrest Gump (probably)

In case anyone is a Forum lurker and ever experiences this problem… this was related to rJava. Somewhere along the way I didn’t have rJava installed. Not sure why it didn’t come in the package Build check but I was able to proceed with most of the study before I found the error.

Moral of the story: I opened an issue on the PLP GitHub (https://github.com/OHDSI/PatientLevelPrediction/issues/150) about the need to improve the documentation around package dependencies either in the installation guide or by making the DESCRIPTION file contents actually part of the CodetoRun. Relying on a user to guess which package they forgot to install is a bit too advanced for the average bear.

1 Like
t