A user sent me this message individually, but I thought it could be useful/helpful to other members of the Stata community:
Hi, recently I saw that you finished a new user written command to replace the old geocode3 among other things. If you have some experience using Google APIs in stata, I was hoping you could help with an issue we've been having using insheetjson and google APIs with one of our own commands. We are using google places API to pull some different results instead of the geocode API, but Places API is pretty similar to geocode API.
The issue we are having is when we are running the command for any decently sized data set (anything over 1000 observations), for some reason we can't figure out why, the program will randomly terminate with a Obs. nos. out of range r(198) error. The weird thing is, if we run the command again over the same data set (the original data set, with no API results from the previous run), often we will not get the same error as the program passes the observation that it previously terminated on. For example, if on one run it terminated on observation 200, on the next run it will usually run just fine through observation 200.
At first I thought this must be due to timing out when contacting google, so we added a delay in our loop with the sleep command. However this did nothing to fix the issue, no matter how long we made the delay. We tried a few other methods, even used different hard drives just in case there was some communication issue there, but nothing seems to solve the issue. I was curious if you had similar problems when running your command, and if so how you solved them?
Thanks in advance,
The issue we are having is when we are running the command for any decently sized data set (anything over 1000 observations), for some reason we can't figure out why, the program will randomly terminate with a Obs. nos. out of range r(198) error. The weird thing is, if we run the command again over the same data set (the original data set, with no API results from the previous run), often we will not get the same error as the program passes the observation that it previously terminated on. For example, if on one run it terminated on observation 200, on the next run it will usually run just fine through observation 200.
At first I thought this must be due to timing out when contacting google, so we added a delay in our loop with the sleep command. However this did nothing to fix the issue, no matter how long we made the delay. We tried a few other methods, even used different hard drives just in case there was some communication issue there, but nothing seems to solve the issue. I was curious if you had similar problems when running your command, and if so how you solved them?
Thanks in advance,
Comment