Closed JanDitzen closed 5 years ago
@JanDitzen Can you provide an the code that you ran? I can't tell how the information above was generated and need to recreate it. Also, if you could provide a copy of the error message that gets returned that would be helpful/useful as well.
@wbuchanan thanks for coming back to me and apologies for not replying earlier. The problem occurs if the number of maximum requests per hour is reached. I build an artificial example here (I decided not to use the code environment here because it kills the locals in the stata code and attached the do file as well):
clear all
local counter = 1
forvalues year = 1991(1)2018 {
foreach s in 2701 2704 2705 2706 2707{
clear
local request "https://comtrade.un.org/api/get?r=276&px=HS&ps=`year'&p=all&rg=all&cc=`s'&max=100000&type=C&freq=A&fmt=json"
display "request: request', counter:
counter'"
jsonio kv , file("request'") local counter =
counter' + 1
}
}
On my machine it usually stops with request #100. The error is the following:
--Break-- r(1);
If I type into my browser the last request url, I receive the following message:
USAGE LIMIT: Hourly usage limit of 100 actions reached. You may resume use of this service at 2018-12-20T09:41:51Z.
Hopefully this helps. Best, Jan
I'm also having the same issue running this command jsonio kv, file("$first_round/participant_rounds.json") nourl
Hi, I am trying to download comtrade data from their json API. Occasionally jsonio aborts with error message 1 (i.e. like if I would press the break button). Using set trace on, the last command line reads: javacall org.paces.Stata.Input.InJSON insheetUrl, args(`"https://comtrade.un.org/api/get?r=36&px=HS&ps=1990%2C1991%2C1992%2C1993&p=all&rg=all&cc=2701%2C270119&max=50000&type=C&freq=A"' ".*") I am wondering if the server rejects my request or if this is a bug. Thanks a lot!
Jan