MRCIEU / ieugwasr

R interface to the IEU GWAS database API
https://mrcieu.github.io/ieugwasr/
Other
67 stars 23 forks source link

Help with .onLoad Error in ieugwasr Package when Calling available_outcomes() #53

Closed JACKDDDDDDDDDDDD closed 3 months ago

JACKDDDDDDDDDDDD commented 3 months ago

Hello,

I am encountering an issue with the ieugwasr package in R. Specifically, when I call the available_outcomes() function, it results in an .onLoad error during the package's namespace loading process. Despite several troubleshooting attempts, the problem still persists. I'm reaching out for guidance or suggestions from the community on resolving this issue.

Error Description: Executing available_outcomes() leads to the following error: Error: loadNamespace() failed in .onLoad() for 'ieugwasr', details: call: x[["date"]] error: subscript out of bounds

I also used traceback(), and here is the output: 4: stop(gettextf("%s failed in %s() for '%s', details:\n call: %s\n error: %s", hookname, "loadNamespace", pkgname, deparse(conditionCall(res))[1L], conditionMessage(res)), call. = FALSE, domain = NA) 3: runHook(".onLoad", env, package.lib, package) 2: loadNamespace(x) 1: available_outcomes()

Environment:

Step Taken to Resolve: Reinstalled the ieugwasr package from GitHub. "Warning message: In i.p(...) : The exit status was not 0 when installing the package 'C:/Users/12592/AppData/Local/Temp/Rtmp2hzvM9/fileb6438c229b2/ieugwasr_0.1.6.tar.gz'" I actually installed the ieugwasr package using the following code: install.packages("ieugwasr", repos = c("https://mrcieu.r-universe.dev", "https://cran.r-project.org"))

I would greatly appreciate any insights into what might be causing this error and how to address it. Has anyone encountered a similar issue, or does anyone have suggestions on what steps to take next?

Thank you very much for your time and assistance.

Best regards

explodecomputer commented 3 months ago

Thanks for pointing it out this was because it wasn't handling properly when the package is loaded offline. Fixed in 83f47dd