rana / GCP.jl

GCP BigQuery APIs in Julia.
MIT License
31 stars 4 forks source link

error generating API for sheets #8

Open bjarthur opened 4 years ago

bjarthur commented 4 years ago

i'm trying to add support for google sheets. i know it exists as it is documented and supported by the discovery service. get these errors though:

julia> Emit.getEmit(:sheets)
ERROR: HTTP.ExceptionRequest.StatusError(404, "GET", "/\$discovery/rest?version=v4", HTTP.Messages.Response:
"""
HTTP/1.1 404 Not Found
Content-Type: text/html; charset=UTF-8
Referrer-Policy: no-referrer
Content-Length: 1576
Date: Sun, 14 Jun 2020 12:08:44 GMT

<!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 404 (Not Found)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.
⋮
1576-byte body
""")
Stacktrace:
 [1] request(::Type{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}, ::HTTP.URIs.URI, ::Vararg{Any,N} where N; kw::Base.Iterators.Pairs{Symbol,Nothing,Tuple{Symbol},NamedTuple{(:iofunction,),Tuple{Nothing}}}) at /groups/scicompsoft/home/arthurb/.julia/packages/HTTP/BOJmV/src/ExceptionRequest.jl:22
 [2] (::Base.var"#58#60"{Base.var"#58#59#61"{ExponentialBackOff,HTTP.RetryRequest.var"#2#3"{Bool,HTTP.Messages.Request},typeof(HTTP.request)}})(::Type{T} where T, ::Vararg{Any,N} where N; kwargs::Base.Iterators.Pairs{Symbol,Nothing,Tuple{Symbol},NamedTuple{(:iofunction,),Tuple{Nothing}}}) at ./error.jl:288
 [3] #request#1 at /groups/scicompsoft/home/arthurb/.julia/packages/HTTP/BOJmV/src/RetryRequest.jl:44 [inlined]
 [4] request(::Type{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}, ::String, ::HTTP.URIs.URI, ::Array{Pair{SubString{String},SubString{String}},1}, ::Array{UInt8,1}; http_version::VersionNumber, target::String, parent::Nothing, iofunction::Nothing, kw::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /groups/scicompsoft/home/arthurb/.julia/packages/HTTP/BOJmV/src/MessageRequest.jl:51
 [5] request at /groups/scicompsoft/home/arthurb/.julia/packages/HTTP/BOJmV/src/MessageRequest.jl:28 [inlined]
 [6] request(::Type{HTTP.BasicAuthRequest.BasicAuthLayer{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}}, ::String, ::HTTP.URIs.URI, ::Array{Pair{SubString{String},SubString{String}},1}, ::Array{UInt8,1}; kw::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /groups/scicompsoft/home/arthurb/.julia/packages/HTTP/BOJmV/src/BasicAuthRequest.jl:28
 [7] request at /groups/scicompsoft/home/arthurb/.julia/packages/HTTP/BOJmV/src/BasicAuthRequest.jl:21 [inlined]
 [8] request(::Type{HTTP.RedirectRequest.RedirectLayer{HTTP.BasicAuthRequest.BasicAuthLayer{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}}}, ::String, ::HTTP.URIs.URI, ::Array{Pair{SubString{String},SubString{String}},1}, ::Array{UInt8,1}; redirect_limit::Int64, forwardheaders::Bool, kw::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /groups/scicompsoft/home/arthurb/.julia/packages/HTTP/BOJmV/src/RedirectRequest.jl:24
 [9] request(::Type{HTTP.RedirectRequest.RedirectLayer{HTTP.BasicAuthRequest.BasicAuthLayer{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}}}, ::String, ::HTTP.URIs.URI, ::Array{Pair{SubString{String},SubString{String}},1}, ::Array{UInt8,1}) at /groups/scicompsoft/home/arthurb/.julia/packages/HTTP/BOJmV/src/RedirectRequest.jl:21
 [10] request(::String, ::String, ::Array{Pair{SubString{String},SubString{String}},1}, ::Array{UInt8,1}; headers::Array{Pair{SubString{String},SubString{String}},1}, body::Array{UInt8,1}, query::Nothing, kw::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /groups/scicompsoft/home/arthurb/.julia/packages/HTTP/BOJmV/src/HTTP.jl:314
 [11] request at /groups/scicompsoft/home/arthurb/.julia/packages/HTTP/BOJmV/src/HTTP.jl:314 [inlined] (repeats 2 times)
 [12] #get#12 at /groups/scicompsoft/home/arthurb/.julia/packages/HTTP/BOJmV/src/HTTP.jl:391 [inlined]
 [13] get at /groups/scicompsoft/home/arthurb/.julia/packages/HTTP/BOJmV/src/HTTP.jl:391 [inlined]
 [14] get(::String; kws::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /groups/scicompsoft/home/arthurb/.julia/packages/GCP/qh4tD/src/bootstrap.jl:266
 [15] get at /groups/scicompsoft/home/arthurb/.julia/packages/GCP/qh4tD/src/bootstrap.jl:266 [inlined]
 [16] getService(::Symbol; kws::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /groups/scicompsoft/home/arthurb/.julia/packages/GCP/qh4tD/src/bootstrap.jl:272
 [17] getService at /groups/scicompsoft/home/arthurb/.julia/packages/GCP/qh4tD/src/bootstrap.jl:270 [inlined]
 [18] getEmit(::Symbol; kws::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /groups/scicompsoft/home/arthurb/.julia/packages/GCP/qh4tD/src/bootstrap.jl:319
 [19] getEmit(::Symbol) at /groups/scicompsoft/home/arthurb/.julia/packages/GCP/qh4tD/src/bootstrap.jl:317
 [20] top-level scope at REPL[2]:2
rana commented 4 years ago

Hi Ben,

I haven't had time to re-work the existing code to be universally applied to each of the services. Hopefully what is written can offer something to go on. That there is more work to do is not unexpected.

Best regards,

Rana

On Sun, Jun 14, 2020, 5:20 AM Ben Arthur notifications@github.com wrote:

i'm trying to add support for google sheets. i know it exists as it is documented https://developers.google.com/sheets/api/quickstart/js and supported https://www.googleapis.com/discovery/v1/apis by the discovery service. get these errors though:

julia> Emit.getEmit(:sheets)

ERROR: HTTP.ExceptionRequest.StatusError(404, "GET", "/\$discovery/rest?version=v4", HTTP.Messages.Response:

"""

HTTP/1.1 404 Not Found

Content-Type: text/html; charset=UTF-8

Referrer-Policy: no-referrer

Content-Length: 1576

Date: Sun, 14 Jun 2020 12:08:44 GMT

<!DOCTYPE html>

Error 404 (Not Found)!!1