-
Notifications
You must be signed in to change notification settings - Fork 9
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
wm_records_name() & wm_name2id_() produces "Error: (400) Bad Request" on some systems when there are spaces in query #29
Comments
I just noticed |
Hi @zachary-foster, I have been struggling with this same issue in ropensci-archive/mregions#60 It seems indeed a I don't think this will change anytime soon, so we rather find workarounds for our packages |
I think changing worrms internals to use |
Thanks for the insights @salvafern and @sckott! |
I think I'm having a similar problem with the
I tried replacing spaces in the
|
@reblake this was a temp. issue, indeed fixed now, unrelated to this "space" issue |
While debugging an issue with taxize, I found that
wm_records_name
fails on some systems (a clean Windows install in this case). It might have something to do with how spaces in the URL call to the Worrms API are formatted, although I am not sure. Here is a reprex I was using to debug the error:Created on 2022-03-29 by the reprex package (v2.0.1)
The error happens in the internal function
wm_GET
. It produces this URL:Which results in a "(400) Bad Request" error when called with
crul::HttpClient
, but works when pasting into an internet browser (Firefox in my case). The browser replaces the space in "Gadus morhua" with "%20" automatically, making the URL:This error did not occur on my Linux system (PopOS).
Session Info
The text was updated successfully, but these errors were encountered: