Closed Bhashitha2014 closed 5 months ago
This error is caused by the if block at https://github.com/MRCIEU/ieugwasr/blob/master/R/query.R#L91-L96 not being checked for an error first like the if blocks above it within in the while loop.
It also doesn't appear that the JWT stuff is fully implemented yet so it's not going to work anyway without changing this around https://github.com/MRCIEU/ieugwasr/blob/master/R/query.R#L26-L27
The third issue is that we block the new API URL, but we'll deal with that internally.
Once @explodecomputer is finished with the 1.0 release I'm sure this will all work fine, it looks like he's still in progress.
Is there anything that I can run from my end to fix this issue?
In the latest commit the user
function should be working now, and I've made the change that @jekriske-lilly spotted (thanks for that). See if it fixes otherwise let me know what code you used to generate the error and I can have a look again.
A quick note also to not share your token with others as it's essentially a password. You can reset the one posted above on the profile page.
When I just followed the steps mentioned under the authentication step as mentioned below;
OPENGWAS_JWT=<token>
to your .Renviron
file. This file could be either in your home directory or in the working directory of your R session. You can check the location of your .Renviron
file by running Sys.getenv("R_ENVIRON_USER")
in R.ieugwasr::get_opengwas_jwt()
. If it returns a long random string then you are authenticated.user()
. It will make a request to the API for your user information using your token. It should return a list with your user information. If it returns an error, then your token is not working.However, I am still getting the error as mentioned.
Please confirm you are using the latest version (0.2.2-9003 at time of writing) and also note https://github.com/MRCIEU/ieugwasr/issues/65#issuecomment-2058909831
Please confirm you are using the latest version (0.2.2-9003 at time of writing) and also note #65 (comment)
0.2.2.9002
Detach and remove (you current) ieugwasr, then remotes::install_github("mrcieu/ieugwasr")
Detach and remove (you current) ieugwasr, then
remotes::install_github("mrcieu/ieugwasr")
Thanks a lot! It is now resolved.
Yes - always detach packages before updating them - or simpler still just restart (close and reopen) your R session.
And remember you can install a prebuilt binary version for several different operating systems and architectures from https://mrcieu.r-universe.dev/builds
For Windows and Mac users
install.packages("ieugwasr", repos = c("https://mrcieu.r-universe.dev", "https://cran.r-project.org"))
For Ubuntu Jammy Jellyfish users
# Installation code for Ubuntu Jammy Jellyfish users running R in the Terminal
options(HTTPUserAgent = sprintf(
"R/%s R (%s)",
getRversion(),
paste(getRversion(),
R.version["platform"],
R.version["arch"],
R.version["os"])
))
install.packages(
'ieugwasr',
repos = c(
'https://mrcieu.r-universe.dev/bin/linux/jammy/4.3/',
'https://packagemanager.posit.co/cran/__linux__/jammy/latest',
'https://cloud.r-project.org'
)
)
As mentioned in the documentation, I was able to generate the token from https://api.opengwas.io/profile/ and updated it in .Renviron. In addition, I was able to confirm the token with ieugwasr::get_opengwas_jwt(). However, user() function is giving an error. When I tried to fetch the data from the server, I am getting an error ..