Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stata tmp file not found

    Hi!
    I'm having a problem with the tmp file. I'm geocoding addresses using geocodeopen ado file.
    The command looks like this:

    geocodeopen in 1/10, key("XXXXXX") fulladdr(full_address)

    It worked fine for a while, until I start getting error messages because of missing tmp file. Everytime I'm nearing the end of the geocoding process (regardless the number of observations I want to geocode), it seems that Stata cannot locate the tmp file it needs to write the output. When I go check the folder, I see that Stata does create a tmp file but the name is different that the one mentioned in the error message. Any clue? Is it a bug of geocodeopen or Stata?
    Thanks a lot as always!!!
    Thierry
    Geneva


    MapQuest Open Geocoding 1 of 10
    MapQuest Open Geocoding 2 of 10
    MapQuest Open Geocoding 3 of 10
    MapQuest Open Geocoding 4 of 10
    MapQuest Open Geocoding 5 of 10
    MapQuest Open Geocoding 6 of 10
    MapQuest Open Geocoding 7 of 10
    MapQuest Open Geocoding 8 of 10
    MapQuest Open Geocoding 9 of 10
    MapQuest Open Geocoding 10 of 10
    file C:\Users\XXX\AppData\Local\Temp\ST_0k00000m.tmp not found
    r(601);





  • #2
    Thierry, is there any reason for NOT setting set trace on and letting it run like that?

    geocodeopen is using a web service for geocoding. Which means it communicates with a remote computer to perform these computations. Necessarily, there are some complications: You may be doing everything right, but the program still won't work. You will have a hard time looking for any serious service, whether geocoding, or IP-lookup, or anything else that would allow you to send millions of queries for free and provide a reliable response. MapQuest definitely can fail. And the program performing the query must properly react to that. Which geocodeopen is trying to do by retrying the request until it succeeds (usually not the best strategy). Note the comment about Google Maps in the program:
    have severe limits on number of queries
    You don't see the "Connection error..." message, which means that it is likely you've got a different [from 2 & 612] error code, that this program is not handling correctly.

    See my -truernd- for example of complicated strategy for utilizing a paid web service with quotas on requests and allowance for free requests.
    It is mentioned also among the many clients developed for various environments: http://www.random.org/clients/http/archive/
    In fact most of the code is dealing with the quotas, getting the random numbers is super trivial. Compatibility with Stata 7 is another nice bonus .

    Hope this helps. No need to guess of the puzzles. Just run the trace.

    @authors of the geocodeopen: I can hardly see any need for more than 2-3 tempfiles in this task. Definitely not _N tempfiles:
    Code:
    local cnt = _N
    ...
    forval i = 1/`cnt' {
    ...
        tempfile txtfile`counter'
    Best, Sergiy Radyakin

    Comment

    Working...
    X