OHDSI Home | Forums | Wiki | Github

Error Message 'cannot open URL' when trying to install HADES packages

Hi all,

I’m new to the OHDSI community and am trying to install the HADES packages. I’ve followed the guidelines for setting up the R environment and have installed RStudio (v2023.12.1 Build 402), R (v4.2.3), Rtools (v4.2) and Java. I have also set up a GitHub PAT and updated the .Renviron file.

When I try and install one of the Hades packages using the command:


I get the following error message:

Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo ohdsi/CohortMethod@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet, :
cannot open URL ‘https://api.github.com/repos/ohdsi/CohortMethod/tarball/HEAD

Is anyone able to suggest how to resolve this issue?

Many thanks,


Hi @FranB ! Your error message suggests there may be a network problem (if you click on the URL you should see it works just fine). Perhaps your firewall is set to block GitHub?

Thanks, I’m on a work laptop so I should’ve thought of that! I’ll check it out. Do you know if there is a way I can download the packages manually and install using devtools?

Sorry, I’m not aware of an easy way to download the packages first (it’s not just the packages, but also all of their dependencies)

No worries, thanks anyway :slight_smile:

@FranB You may be able to use the package pak as an alternative to remotes/devtools, it supports downloading a package and all of it’s dependencies to a specified location.

1 Like