SymbolixAU / googleway

R Package for accessing and plotting Google Maps
http://symbolixau.github.io/googleway/
Other
234 stars 46 forks source link

Error with batch searches using google_places() #262

Closed alexandragibbons closed 1 year ago

alexandragibbons commented 1 year ago

Hello! I am using google_places to search for facilities in batches. The code to do this is:

set_key(key = key)
facility2013_searchresults <- pmap(list(facility2013_searchterms$search), googleway::google_places)

It usually works, but over the past couple of days I've been getting this error:

"Error in value[[3L]](cond) : 
  There was an error downloading results. Please manually check the following URL is valid by entering it into a browswer. If valid, please file a bug report citing this URL (note: your API key has been removed, so you will need to add that back in)"

When I test the URL below the error message it works fine. The URL cited in the error is different each time. Any ideas about what this could be? I am not using a firewall or anything like that and my key is working. Thank you for your help!

dcooley commented 1 year ago

what is pmap and what does it do?

You might be hitting a rate limit, as Google only lets you ask a certain number number of queries per minute / second.

dcooley commented 1 year ago

what was the resolution to this?

alexandragibbons commented 1 year ago

I removed all of the objects from my environment and then reinstalled googleway and it started working. I think it might have been because I was rerunning searches without deleting the old results.