Closed lhjohn closed 3 years ago
Reposting Martijn's explanation here and closing the issue. Reopen if the solution below isn’t working.
Technical explanation: The reason why this appears to be happening is because the latest version of RSQLite has added a field to the SQLiteConnection class. Multiple classes in HADES inherit from this class, and we discovered R has a weird habit of caching class definitions when installing packages. That means for example that the FeatureExtraction package, once installed, maintains a copy of the SQLiteConnection class definition. When the SQLiteConnection class is updated, for example because the new version of RSQLite is installed, the new and the cached version are out of sync, causing the error.
Solution: when the packages are reinstalled, the cache is recreated. So, after updating RSQLite, when this error starts to appear, reinstall those packages that introduce classes that inherit from SQLiteConnection:
# Uninstall the packages:
remove.packages(c("FeatureExtraction", "CohortMethod", "SelfControlledCaseSeries"))
# Reinstall the packages (remove any that you don't need):
remotes::install_github("ohdsi/FeatureExtraction")
remotes::install_github("ohdsi/CohortMethod")
remotes::install_github("ohdsi/SelfControlledCaseSeries")
Using: R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out" Platform: x86_64-apple-darwin17.0 (64-bit)
Reproduce: I was successfully loading plpData objects using
plpData <- PatientLevelPrediction::loadPlpData([...])
. Then I decided to update all my R packages (08-02-2021 at 11 UTC). One update must have broken the plpData objects loading. I now get the following error.Can anyone reproduce this?