Closed jpazvd closed 5 years ago
before we proceed, what version of github
are you using?
the error message is clear, your machine cannot access the GitHub API, this happens occasionally, or when you have searched the GitHub API many times within a short period and have exceeded your API usage limit. It will be fixed automatically, i.e. GitHub will allow you to contact the API again after a while. When you use a different machine, you will get a different IP so that is why you can get different results from identical programs when you reach the limit (actually you should wait much more than 20 seconds, I will correct the error message)
please reopen the issue if the error remains
Hello,
If I type :
which github
I do not get a version number.
However, on the help file it shows github version 1.5.1
I am afraid the problem might be of a different nature. I just ran the four commands manually (with set rmsg on):
github search azevedo github install haghish/markdoc github query haghish/markdoc github search azevedo
As you can see the log below, both github install and github query worked fine. The only problem was the github search (even after waiting 4 minutes minute execution).
============= Stata Log =====================
. github search azevedo the GitHub API is not responsive right now. Try again in 10 or 20 seconds. this can happen if you search GitHub very frequent... r; t=0.24 16:21:50
. github install haghish/markdoc checking markdoc consistency and verifying not already installed... installing into c:\ado\plus... installation complete.
Checking package dependencies installing markdoc package dependencies:
. github install haghish/weaver , version(3.4.1) checking weaver consistency and verifying not already installed... installing into c:\ado\plus... installation complete.
Checking package dependencies installing weaver package dependencies:
. github install haghish/statax , replace checking statax consistency and verifying not already installed... installing into c:\ado\plus... installation complete.
Checking package dependencies statax package has no dependency
. end of do-file
. github install haghish/md2smcl checking md2smcl consistency and verifying not already installed... installing into c:\ado\plus... installation complete.
Checking package dependencies md2smcl package has no dependency
. . end of do-file r; t=19.61 16:22:22
. github query haghish/markdoc
r; t=1.04 16:22:31
. github search azevedo the GitHub API is not responsive right now. Try again in 10 or 20 seconds. this can happen if you search GitHub very frequent... r; t=0.19 16:22:35
. github search azevedo the GitHub API is not responsive right now. Try again in 10 or 20 seconds. this can happen if you search GitHub very frequent... r; t=0.24 16:24:18 .
In Stata 14, I have github 1.3.3 and the github search works fine.
I have tried to got back to github 1.3.3 but I am not sure which syntax to use. I have tried both below with no success.
github haghish/github, version("1.3.3")
github install github, version("1.3.3")
Any help will be much appreciated.
Best regards,
JP
From: E. F. Haghish notifications@github.com Sent: Saturday, December 8, 2018 2:56 PM To: haghish/github github@noreply.github.com Cc: Joao Pedro Wagner De Azevedo jazevedo@worldbank.org; Author author@noreply.github.com Subject: Re: [haghish/github] HTTPS problem with Stata 15.1 (only problem with github search) (#6)
[External]
before we proceed, what version of github are you using?
the error message is clear, your machine cannot access the GitHub API, this happens occasionally, or when you have searched the GitHub API many times within a short period and have exceeded your API usage limit. It will be fixed automatically, i.e. GitHub will allow you to contact the API again after a while. When you use a different machine, you will get a different IP so that is why you can get different results from identical programs when you reach the limit (actually you should wait much more than 20 seconds, I will correct the error message)
please reopen the issue if the error remains
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/haghish/github/issues/6#issuecomment-445485473, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AdqfKWFLy1Zzxe5x6SSeLAh4ewULfLQ3ks5u3BlFgaJpZM4ZJyGC.
If I type : which github
I do not get a version number.
However, on the help file it shows github version 1.5.1
I am afraid the problem might be of a different nature. I just ran the four commands manually (with set rmsg on):
github search azevedo github install haghish/markdoc github query haghish/markdoc github search azevedo
As you can see the log below, both github install and github query worked fine. The only problem was the github search (even after waiting 4 minutes minute execution).
============= Stata Log =====================
. github search azevedo the GitHub API is not responsive right now. Try again in 10 or 20 seconds. this can happen if you search GitHub very frequent... r; t=0.24 16:21:50
. github install haghish/markdoc checking markdoc consistency and verifying not already installed... installing into c:\ado\plus... installation complete.
Checking package dependencies installing markdoc package dependencies:
. github install haghish/weaver , version(3.4.1) checking weaver consistency and verifying not already installed... installing into c:\ado\plus... installation complete.
Checking package dependencies installing weaver package dependencies:
. github install haghish/statax , replace checking statax consistency and verifying not already installed... installing into c:\ado\plus... installation complete.
Checking package dependencies statax package has no dependency
. end of do-file
. github install haghish/md2smcl checking md2smcl consistency and verifying not already installed... installing into c:\ado\plus... installation complete.
Checking package dependencies md2smcl package has no dependency
. . end of do-file r; t=19.61 16:22:22
. github query haghish/markdoc
r; t=1.04 16:22:31
. github search azevedo the GitHub API is not responsive right now. Try again in 10 or 20 seconds. this can happen if you search GitHub very frequent... r; t=0.19 16:22:35
. github search azevedo the GitHub API is not responsive right now. Try again in 10 or 20 seconds. this can happen if you search GitHub very frequent... r; t=0.24 16:24:18 .
In Stata 14, I have github 1.3.3 and the github search works fine.
I have tried to got back to github 1.3.3 but I am not sure which syntax to use. I have tried both below with no success.
github haghish/github, version("1.3.3")
github install github, version("1.3.3")
Any help will be much appreciated.
Best regards,
JP
ok so:
only the search
subcommand contacts the search
API. this is a whole different procedure for installing, uninstalling, query, etc.
You can surely install an older version of github
, which is why we support GitHub ;) the syntax is the same as of any package. First make sure you get the right version you wish to install and then type github install username/repository, version(dada)
and it should be fine
the problem still is that GitHub website has locked your computer. Which means, if you use a different version of Stata on the same machine you should still get nothing because your IP is blocked.
If your IP address is blocked by GitHub temporarily, there are ways you can check that. I don't quite remember the command line code that you could run to see whether your access is denied or not but you will find these links helpful:
You can try updating your github
on the other machine with Stata 14 and there should be no problem. Also, on my machines I do not get any problem doing your search...
Thanks. I will try tomorrow. I have been trying for the last days, and it has always failed. Even behind a VPN.... It is quite strange.
ok so:
- only the
search
subcommand contacts thesearch
API. this is a whole different procedure for installing, uninstalling, query, etc.- You can surely install an older version of
github
, which is why we support GitHub ;) the syntax is the same as of any package. First make sure you get the right version you wish to install and then typegithub install username/repository, version(dada)
and it should be fine- the problem still is that GitHub website has locked your computer. Which means, if you use a different version of Stata on the same machine you should still get nothing because your IP is blocked.
If your IP address is blocked by GitHub temporarily, there are ways you can check that. I don't quite remember the command line code that you could run to see whether your access is denied or not but you will find these links helpful:
You can try updating your
github
on the other machine with Stata 14 and there should be no problem. Also, on my machines I do not get any problem doing your search...
Thanks. I have updated github to version 1.5.5 on my desktop running Stata 14. And github search is working fine.
You can try updating your
github
on the other machine with Stata 14 and there should be no problem. Also, on my machines I do not get any problem doing your search...
Ok, so there is something with the other machine, I hope it'd be fixed by tomorrow. Otherwise, I look forward to the bug reports. thank you for your effort and bug report, btw
Thanks for your help. I will keep you posted. Best, JP
From: E. F. Haghish notifications@github.com Sent: Saturday, December 8, 2018 5:19 PM To: haghish/github github@noreply.github.com Cc: Joao Pedro Wagner De Azevedo jazevedo@worldbank.org; Author author@noreply.github.com Subject: Re: [haghish/github] HTTPS problem with Stata 15.1 (only problem with github search) (#6)
[External]
Ok, so there is something with the other machine, I hope it'd be fixed by tomorrow. Otherwise, I look forward to the bug reports. thank you for your effort and bug report, btw
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/haghish/github/issues/6#issuecomment-445494149, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AdqfKeHl3U6yjj9glTLcioWN8Tz7x3u4ks5u3DrlgaJpZM4ZJyGC.
Hello, I have tried again. And it is still not working. below follows the full log file. (set trace on) Best, JP
=================================================
. github search azevedo ------------------------------------------------------------------------------ begin github ---
hed(str) debug reference(str) append replace Number(numlist max=1) local]
1'" == "query" { = if "search" == "query" { githubquery
anything'
exit
}1'" == "version" { = if "search" == "version" { githubdb version, name(
anything')
exit
}1'" == "list" { = else if "search" == "list" { if !missing("
anything'") {
err 198
}
githubdb list
exit
}1'" == "update" { = if "search" == "update" { if missing("
anything'") {
di as err "package name is required"
qui err 198
}
capture githubdb check, name("anything'") if !missing("
r(address)'") {
github install r(address)' } else { tokenize "
anything'", parse("/")
if !missing("3'") { capture githubdb check, name("
anything'")
if !missing("r(address)'") { github install
r(address)'
}
}
else {
githubdb check, name("`anything'")
}
}
exit
}1'" == "uninstall" { = else if "search" == "uninstall" { githubdb erase, name("
2'")
ado uninstall `2'
exit
}local'") | !missing("
net'") {
= if !missing("") | !missing("") {
findall 2', language(
language') in(in')
local' net'
all'
exit
}2', language(
language') in(in') save(
save') all' created(
created') pushed(
pushed')
debug'append'
replace' number(`number') = githubsearch azevedo, language() in() save() created() pushed() number() ---------------------------------------------------------------------- begin githubsearch ---
- syntax anything , [language(str) save(str) in(str) all created(str) pushed(str) debug appen d replace quiet Number(numlist max=1) scoreless]
- if "
language'" == "all" { = if "" == "all" { local savelang
language' local language }- else if missing("`language'") { = else if missing("") {
- local savelang Stata
- local language "+language:stata"
- }
- else { local savelang
language' local language "+language:
language'" }- if !missing("
created'") { = if !missing("") { local created "+created:
created'" }- if !missing("
pushed'") { = if !missing("") { local pushed "+pushed:
pushed'" }- local inoriginal "`in'" = local inoriginal ""
- local in : subinstr local in " " "", all
- if missing("`in'") { = if missing("") {
- local in "name,description"
- local savein "name,description"
- }
- else if "`in'" == "all" { = else if "name,description" == "all" { local in "name,description,readme" local savein all }
- else if "
in'" != "name" & "
in'" != "description" & "in'" != "readme" & "
in'" != "all" & "in'" != "name,description" & "
in'" != "description,name" & "in'" != "name,description,re adme" & "
in'" != "description,name,readme" & !missing("in'") { = else if "name,description" != "name" & "name,description" != "description" & "name,descript ion" != "readme" & "name,description" != "all" & "name,description" != "name,description" & " name,description" != "description,name" & "name,description" != "name,description,readme" & " name,description" != "description,name,readme" & !missing("name,description") { di as err
"option in("`inoriginal'") is unacceptable"' err 198 }- preserve
- quietly clear --------------------------------------------------------------------------- begin clear ---
- if _caller() < 10 { _clear_9 `0' exit }
- version 10
- syntax [anything]
- tokenize `anything' = tokenize
- if
"
2'"' != "" { = if""' != "" { display as err "
2' not allowed" exit 198 }- if "`1'"=="" { = if ""=="" {
- drop _all
- label drop _all ------------------------------------------------------------------------- begin label ---
- version 10.0
- gettoken val : 0
- if (strpos("
val'", "val") > 0 ) { = if (strpos("drop", "val") > 0 ) { gettoken val 0 : 0 syntax anything [, nofix] if "
fix'" != "" { local fix ", nofix" } gettoken var rest : anything while"
rest'"' != "" { gettoken lab rest : rest local label "lab'" } local vlist : list anything - lab if "
lab'" == "." { local lab "" } foreach var of varlistvlist' { _label
val'var'
lab' `fix' } }- else {
- _label `macval(0)' = _label drop _all
- } --------------------------------------------------------------------------- end label ---
- }
- else if "`1'"=="mata" { = else if ""=="mata" { mata: mata clear }
- else if inlist("
1'", "results", "matrix") { = else if inlist("", "results", "matrix") { return clear clearreturn ereturn clear sreturn clear _return drop _all if ("
1'" == "matrix") { matrix drop _all _est drop _all } }- else if "`1'"=="programs" { = else if ""=="programs" { program drop _all }
- else if "`1'"=="ado" { = else if ""=="ado" { program drop _allado }
- else if "
1'"=="rngstream" | "
1'"=="rngstreams" { = else if ""=="rngstream" | ""=="rngstreams" { set rngstream clear }- else if "
1'"=="*" | "
1'"=="all" { = else if ""=="*" | ""=="all" { capture mata: st_local("semmods", strofreal(sg__global.hasmodels())) capture if (0`semmods') { display as err "-clear all- not allowed while an SEM Builder is open" exit 1 } drop _all label drop _all matrix drop _all scalar drop _all constraint drop _all eq drop _all file close _all postutil clear _return drop _all discard program drop _all timer clear mata: _st__put_cmd_clear() mata: mata clear }- else { display as err "`1' not allowed" exit 198 } ----------------------------------------------------------------------------- end clear ---
- tempfile data
- qui generate str address = ""
- qui generate str name = ""
- qui generate int installable = .
- qui generate str language = ""
- qui generate int star = .
- qui generate int fork = .
- qui generate str created = ""
- qui generate str updated = ""
- qui generate str pushed = ""
- qui generate int kb = .
- qui generate int watchers = .
- qui generate str description = ""
- qui generate str homepage = ""
- if !missing("
debug'") { = if !missing("") { di as err "{p}https://api.github.com/search/repositories?q=
anything'language'
created'pu shed'+in:
in'&sort=stars&order=desc&per_page=50" _n copy "https://api.github.com/search/repositories?q=`anything'`language'`created'`pushed'+in :`in'&sort=stars&order=desc&per_page=50" "base.json", replace }- tempfile apifile tmp
- tempname hitch knot
- capture qui copy "https://api.github.com/search/repositories?q=`anything'`language'`created '
pushed'+in:
in'&sort=stars&order=desc&per_page=50" `apifile', replace = capture qui copy "https://api.github.com/search/repositories?q=azevedo+language:stata+in:na me,description&sort=stars&order=desc&per_page=50" C:\Users\wb255520\AppData\Local\Temp\ST_267 c_000003.tmp, replace- if _rc != 0 {
- di as err "{p}the GitHub API is not responsive right now. Try again in " "10 or 20 seconds. this can happen if you search GitHub very frequent..." the GitHub API is not responsive right now. Try again in 10 or 20 seconds. this can happen if you search GitHub very frequent... - exit ------------------------------------------------------------------------ end githubsearch {hline} - exit -------------------------------------------------------------------------------- end github {hline} r; t=0.25 14:49:10
It is difficult to help you without having access to your computer. I can only make suggestions to help you. There could be a possibility that there would be a bug from:
Please report information about your machine and I will think of a helpful procedure.
The problem is that this json file cannot be copied by your Stata. From this point, we know that the error is not caused by github
package. But it'd be interesting to see why you cannot copy this.
https://api.github.com/search/repositories?q=azevedo+language:stata+in:name,description&sort=stars&order=desc&per_page=50
you may try copying this file from your Stata and see if you can copy it to a file and see if the error can be reproduced.
I fully understand. I have a Stata ado called wbopendata which also brings data from an API. In order to help users debug I have written a simple checklist to make sure if all the API calls are working, properly. I wonder is something of this nature could be adapted to GitHub
if ("`l2'" == "") {
noi di ""
noi di as err "{p 4 4 2} Sorry... No data was downloaded for " as result "`queryspec2'. {p_end}"
noi di ""
noi dis as text `"{p 4 4 2} (1) Please check your internet connection by {browse "http://data.worldbank.org/" :clicking here}, if does not work please check with your internet provider or IT support, otherwise... {p_end}"'
noi dis as text `"{p 4 4 2} (2) Please check your access to the World Bank API by {browse "http://api.worldbank.org/indicator" :clicking here}, if does not work please check with your firewall settings or internet provider or IT support, otherwise... {p_end}"'
noi dis as text `"{p 4 4 2} (3) Please check the availability of your indicator or topic by {browse "`queryspec'" :clicking here}. If the paramater value is not valid... {p_end}"'
noi dis as text `"{p 4 4 2} (4) Please check the list of available indicator(s) or topic(s) in the help {help wbopendata} or by visiting the {browse "http://data.worldbank.org/querybuilder" :API query builder}, if all the above seems fine... {p_end}"'
noi dis as text `"{p 4 4 2} (5) Please consider adjusting your Stata timeout parameters. For more details see {help netio}. {p_end}
noi dis as text `"{p 4 4 2} (6) Please send us an email to report this error by {browse "mailto:data@worldbank.org, ?subject= wbopendata query error at `c(current_date)' `c(current_time)': `queryspec' " :clicking here} or writing to: {p_end}"'
noi dis as result "{p 12 4 2} email: " as input "data@worldbank.org {p_end}"
noi dis as result "{p 12 4 2} subject: " as input `"wbopendata query error at `c(current_date)' `c(current_time)': `queryspec' {p_end}"'
noi di ""
noi di ""
break
exit 20
}
Best regards, JP
From: E. F. Haghish notifications@github.com Sent: Sunday, December 9, 2018 3:12 PM To: haghish/github github@noreply.github.com Cc: Joao Pedro Wagner De Azevedo jazevedo@worldbank.org; Author author@noreply.github.com Subject: Re: [haghish/github] HTTPS problem with Stata 15.1 (only problem with github search) (#6)
[External]
It is difficult to help you without having access to your computer. I can only make suggestions to help you. There could be a possibility that there would be a bug from:
Please report information about your machine and I will think of a helpful procedure.
The problem is that this json file cannot be copied by your Stata. From this point, we know that the error is not caused by github package. But it'd be interesting to see why you cannot copy this.
you may try copying this file from your Stata and see if you can copy it to a file and see if the error can be reproduced.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/haghish/github/issues/6#issuecomment-445567446, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AdqfKcBohBvJ-2ipC_hBdu89GS0_j9Q5ks5u3W6FgaJpZM4ZJyGC.
I found the cause and solution… It is stata checksum command…
I have to make sure that checksum is off
set checksum off, perm
you should be able to replicate my problem in your machine
* Problem *** set checksum on github search azevedo, in(all) language(Stata) all
* Solution *** set checksum off github search azevedo, in(all) language(Stata) all
I still have not figure out why some installations of Stata the checksum is turned on, while in others it is turned off, what is worse is that the option permanently does not seem to work….
What is more worrisome is why APIs do not work with a checksum option (which in principle is useful to preserve the integrity of the transferred data)
Best regards,
JP
From: E. F. Haghish notifications@github.com Sent: Sunday, December 9, 2018 3:12 PM To: haghish/github github@noreply.github.com Cc: Joao Pedro Wagner De Azevedo jazevedo@worldbank.org; Author author@noreply.github.com Subject: Re: [haghish/github] HTTPS problem with Stata 15.1 (only problem with github search) (#6)
[External]
It is difficult to help you without having access to your computer. I can only make suggestions to help you. There could be a possibility that there would be a bug from:
Please report information about your machine and I will think of a helpful procedure.
The problem is that this json file cannot be copied by your Stata. From this point, we know that the error is not caused by github package. But it'd be interesting to see why you cannot copy this.
you may try copying this file from your Stata and see if you can copy it to a file and see if the error can be reproduced.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/haghish/github/issues/6#issuecomment-445567446, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AdqfKcBohBvJ-2ipC_hBdu89GS0_j9Q5ks5u3W6FgaJpZM4ZJyGC.
That would have taken ages to figure out. Thank you for debugging this problem. And it's weird why this error occurs. I haven't used checksum before...
Hello,
I am running the github ado in Stata 15.1. and I keep getting the follow error message when I use the search option
. github search azevedo the GitHub API is not responsive right now. Try again in 10 or 20 seconds. this can happen if you search GitHub very frequent... r; t=0.19 14:29:08
The options query, install and uninstall work fine in the same machine on the same Stata instalation.
The option search works fine in my personal desktop running Stata 14.
Do others have this problem? Is there a fix?
Best regards,
JP