Closed noellemetro closed 3 years ago
Hi,
Like you said, I cannot reproduce the issue. It may be related to the internet connection.
I added a timeout
option in mp_geocode
:
https://github.com/michaeldorman/mapsapi/commit/efb843b38defd0e18ceebf9ec74a65e5c1a75b37
according to an example in this thread:
https://github.com/ropensci/rtweet/issues/229
Please try to install the development version of mapsapi
:
remotes::install_github("michaeldorman/mapsapi")
and then set a larger timeout
in mp_geocode
(default is 10
seconds):
mp_geocode("212 W 10th Gibson City IL 60936", key = ..., timeout = 60)
Will be happy to hear if this helped or not.
Also please check out the recommendation here: https://stackoverflow.com/questions/54624278/getting-connection-timed-out-error-while-geocoding-in-r
Thanks and Best regards,
Michael
Hi Michael,
The updated function worked perfectly and resolved the issue for me.
Thank you for your time!
Best,
Noelle
Great, glad to hear!
While I am running
mapsapi::mp_geocode
, I cannot geocode more than 10 in any list before receive this error:I have tried to set this timeout response manually but have not had luck.
It's very hard to reproduce this result because of it is dependent on the full traceback failure inside
xml2
:I'm going through the traceback and I'm wondering if it may be possible to manually set the
timeout
number. I've tried global options and there may be a spot in the traceback for such a timeout variable.The function only appears to be problematic when geocoding has returned XML and it takes longer than 10 seconds.
A lot of this is beyond my skill but I wanted to drop this issue here. I can confirm my API key is working normally and my server admin has also confirmed that there is not a rule that would cause this issue.