-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error of available_datasets() when calling get_datasets() #115
Comments
I got the same error message when trying to access DHS datasets via z <- httr::POST("https://dhsprogram.com/data/dataset_admin/index.cfm",
body = values)
writeBin(z$content, tf)
y <- brio::read_lines(tf)
ctrycodelist_lines <- grep("name=\"ctrycodelist\" value=",
y, value = TRUE) I get an empty ctrycodelist_lines
#> character(0) |
I have also encountered this error with a previously working script, though I've updated R and package installations since the last run. As csq-dr mentioned above, when tracing via debug(rdhs:::available_datasets) ctrycodelist_lines is empty after stepping through
At this point, y has 681 lines; two seem notable:
Line 521 indicates that my credentials were valid, but something went wrong with the form from there. I tried to replicate the error in the web browser. I logged in to dhsprogram.com, then entered "https://dhsprogram.com/data/dataset_admin/index.cfm?action=downloadmanager&Proj_ID=[redacted]" in the location bar. That took me to the download manager rather than producing an error. I'm stymied at this point, but hopefully this will help pinpoint the issue. Please let me know if there is any other information I can provide. |
I think I was able to work around the problem. In |
@rlglaubius I am having the exact same issue as you described above. Same errors, tried debugging in the exact same way and get the same character(0) message when I run ctrycodelist_lines. Can you show the code for exactly how you fixed this? I am having issues following where and how to assign my $Proj_ID manually to work around the issue. Thanks! |
@bpatenaude I cloned the repository then changed line 66 of authentication.R to pass project_number to as.numeric:
Caveats: this worked well enough for me, but I am not affiliated with the rdhs project and have not tested the fix extensively. This change might not address the root cause of the problem. This will not be appropriate if Proj_ID can start with "0". |
Thanks @rlglaubius. @OJWatson is the rdhs project team looking into a fix for this? I know that the DHS has been updating their website over the last week and assume that the root of the issue has do to a change resulting from that website update. |
Hi all, Firstly thanks for the really helpful debugs and apologies for the delays (Github notifications get lost in a stream of emails from Github - just email me at o.watson15@imperial.ac.uk if I am taking long to reply). I have a fix for this which I am just getting tested in #116. This should fix this issue that came about with the new DHS website. This will get merged shortly and will be version 0.7.2. If these changes are needed more urgently then you can install the package from the patching branch:
🤞 this fixes the issue. Best, OJ |
Hi thanks for fixing this @OJWatson and others for helping to debug. By installing the package from this new branch I do not get this error anymore but I am said I do not have access to this dataset, while I do have access and can download it from the DHS website. These requested datasets are not available from your DHS login credentials:
---
EGIR4ASV.rds
---
Please request permission for these datasets from the DHS website to be able to download them Can this still be related to the new DHS website? |
Hey @camillebelmin This error is because that file requested (
Hope it helps, OJ |
Problem solved! |
Hi, First of all thank you so much for this wonderful package, it has been very useful in my research.
I have a question similar to this issue: malaria-atlas-project/malariaAtlas#30, but I could not solve my problem there.
When I call:
I get the following error:
The error apparently comes from the function available_datasets(). The issue I mentioned above has the same error, and @OJWatson provided some guidance that I followed (see the message copied below). In my case, I do have access to the file I am requesting, and I can see well the download manager on the DHS webiste. I have tried to debug and reached the "y". In my case "y" is a very long string looking whose first lines look like:
But I am a bit clueless on what to do now. @OJWatson Does that help you in understanding what is going on? do you need the whole string?
Many thanks
Answer from @OJWatson on on Feb 15, 2019 on this issue: malaria-atlas-project/malariaAtlas#30
The text was updated successfully, but these errors were encountered: