Skip to content
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 http 400 when only one document found #7

Open
mgerault opened this issue May 14, 2021 · 1 comment
Open

error http 400 when only one document found #7

mgerault opened this issue May 14, 2021 · 1 comment

Comments

@mgerault
Copy link

Hello,

When I only found one document with a query, pmApiRequest doesn't work.
In fact, entrez_fetch throw me this error :
Erreur : HTTP failure: 400

Cannot retrieve history data: OUT OF RANGE. Parameter retstart=1 + 1 is greater than number of records available in history. History includes 1 IDs.

My code :
query <- "Mediator of RNA polymerase II transcription subunit 19*[Title/Abstract] AND OS*[Title/Abstract]"

res <- pmQueryTotalCount(query = query, api_key = NULL)
res$total_count

D <- pmApiRequest(query = query, limit = res$total_count, api_key = NULL)

For me, the problem comes from the s variable which is set to one (because of "Parameter retstart=1 + 1 is greater than number of records available in history"), is it possible to set it to 0 instead ?

Thanks in advance

Sorry if this isn't the place to request that, I'm quite new to github.

@leandrorodriguess
Copy link

I'm experiencing the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants