Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading data produces a stack trace #42

Open
GHTaarn opened this issue Jul 16, 2020 · 2 comments
Open

Downloading data produces a stack trace #42

GHTaarn opened this issue Jul 16, 2020 · 2 comments

Comments

@GHTaarn
Copy link

GHTaarn commented Jul 16, 2020

Hello,

I get a stack trace when I run the following simple code:

using Temporal quandl("AAPL")

I am using v0.7 on Julia 1.4.2 on Windows 10. The stack trace is:
`julia> quandl("AAPL")
ERROR: HTTP.ExceptionRequest.StatusError(422, "GET", "/api/v3/datasets/AAPL.csv?&order=asc&collapse=daily&transform=none&api_key=", HTTP.Messages.Response:
"""
HTTP/1.1 422 Unprocessable Entity
Date: Thu, 16 Jul 2020 20:24:56 GMT
Content-Type: text/csv
Content-Length: 141
Connection: keep-alive
Set-Cookie: __cfduid=dd5b5b7f08e0ac20a7e37e8ed837cdf251594931094; expires=Sat, 15-Aug-20 20:24:54 GMT; path=/; domain=.quandl.com; HttpOnly; SameSite=Lax; Secure
Allow: GET, HEAD, POST, PUT, DELETE, OPTIONS, PATCH
Cache-Control: private
Content-Disposition: attachment; filename=errors.csv
Content-Transfer-Encoding: binary
Vary: Origin
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Rack-CORS: miss; no-origin
X-RateLimit-Limit: 50
X-RateLimit-Remaining: 49
X-Request-Id: a2cbe1dc-4b35-4625-901a-6666037b4049
X-Runtime: 0.004441
X-XSS-Protection: 1; mode=block
CF-Cache-Status: DYNAMIC
cf-request-id: 03fae63dbd00000a98cd231200000001
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 5b3e730f9a6f0a98-CEB

code,message
QECx05,The url you requested is incorrect. Please use the following url instead: /api/v3/datasets/:database_code/:dataset_code.
""")
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,Union{Nothing, Bool},Tuple{Symbol,Symbol},NamedTuple{(:iofunction, :reached_redirect_limit),Tuple{Nothing,Bool}}}) at C:\Users\dkgur.julia\packages\HTTP\ZggHU\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,Union{Nothing, Bool},Tuple{Symbol,Symbol},NamedTuple{(:iofunction, :reached_redirect_limit),Tuple{Nothing,Bool}}}) at .\error.jl:288
[3] #request#1 at C:\Users\dkgur.julia\packages\HTTP\ZggHU\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{Symbol,Bool,Tuple{Symbol},NamedTuple{(:reached_redirect_limit,),Tuple{Bool}}}) at C:\Users\dkgur.julia\packages\HTTP\ZggHU\src\MessageRequest.jl:51
[5] 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{Symbol,Bool,Tuple{Symbol},NamedTuple{(:reached_redirect_limit,),Tuple{Bool}}}) at C:\Users\dkgur.julia\packages\HTTP\ZggHU\src\BasicAuthRequest.jl:28
[6] 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 C:\Users\dkgur.julia\packages\HTTP\ZggHU\src\RedirectRequest.jl:24
[7] 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 C:\Users\dkgur.julia\packages\HTTP\ZggHU\src\RedirectRequest.jl:21
[8] 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 C:\Users\dkgur.julia\packages\HTTP\ZggHU\src\HTTP.jl:314
[9] request at C:\Users\dkgur.julia\packages\HTTP\ZggHU\src\HTTP.jl:314 [inlined] (repeats 2 times)
[10] #get#12 at C:\Users\dkgur.julia\packages\HTTP\ZggHU\src\HTTP.jl:391 [inlined]
[11] get at C:\Users\dkgur.julia\packages\HTTP\ZggHU\src\HTTP.jl:391 [inlined]
[12] quandl(::String; from::String, thru::String, freq::Char, calc::String, sort::Char, rows::Int64, auth::String) at C:\Users\dkgur.julia\packages\Temporal\aaVHO\src\data\quandl.jl:77
[13] quandl(::String) at C:\Users\dkgur.julia\packages\Temporal\aaVHO\src\data\quandl.jl:59
[14] top-level scope at REPL[10]:1`

The above stack trace was produced using the master branch, but they look very similar. Testing Tmporal from the package manager also produces 2 broken io tests even though my internet connection is working:
(@v1.4) pkg> test Temporal Testing Temporal Status C:\Users\dkgur\AppData\Local\Temp\jl_kH0qBq\Manifest.toml`
[cd3eb016] HTTP v0.8.16
[83e8ac13] IniFile v0.5.0
[682c06a0] JSON v0.21.0
[739be429] MbedTLS v1.0.2
[c8ffd9c3] MbedTLS_jll v2.16.6+1
[69de0a69] Parsers v1.0.7
[3cdcf5f2] RecipesBase v0.7.0
[a110ec8f] Temporal v0.7.0 #master (https://github.com/dysonance/Temporal.jl.git)
[2a0f44e3] Base64
[ade2ca70] Dates
[8ba89e20] Distributed
[b77e0a4c] InteractiveUtils
[76f85450] LibGit2
[8f399da3] Libdl
[37e2e46d] LinearAlgebra
[56ddb016] Logging
[d6f4376e] Markdown
[a63ad114] Mmap
[44cfe95a] Pkg
[de0858da] Printf
[3fa0cd96] REPL
[9a3f8284] Random
[ea8e919c] SHA
[9e88b42a] Serialization
[6462fe0b] Sockets
[2f01184e] SparseArrays
[10745b16] Statistics
[8dfed614] Test
[cf7118a7] UUIDs
[4ec0a83e] Unicode
252x4 TS{Float64,Date}: 2019-11-08 to 2020-07-16

Index A B C D
2019-11-08 0.8661 0.4502 0.9594 0.9521
2019-11-09 0.9948 0.9384 0.8096 0.9424
2019-11-10 0.3264 0.5326 0.2504 0.2482
2019-11-11 0.6428 0.6582 0.1355 0.933
2019-11-12 0.7978 0.0047 0.6722 0.5679
2019-11-13 0.5892 0.2168 0.0405 0.3032
2019-11-14 0.1981 0.6567 0.5017 0.9752
2019-11-15 0.7119 0.911 0.634 0.4111
2019-11-16 0.6058 0.2036 0.4646 0.9898
2019-11-17 0.0928 0.6436 0.1313 0.6184
2019-11-18 0.5315 0.9159 0.567 0.2534
2019-11-19 0.7706 0.3761 0.2601 0.5941
2019-11-20 0.4898 0.8794 0.5664 0.7599
2019-11-21 0.0851 0.2963 0.0035 0.0947
2019-11-22 0.5599 0.9097 0.9785 0.1205
2019-11-23 0.9376 0.272 0.4989 0.4511
2019-11-24 0.5303 0.6947 0.3957 0.6087
2019-11-25 0.2301 0.8582 0.3287 0.6649
2019-11-26 0.9735 0.9111 0.3314 0.8324
2019-11-27 0.8876 0.2737 0.6894 0.0207

2020-06-26 0.7617 0.3402 0.2275 0.872
2020-06-27 0.2454 0.1151 0.5005 0.671
2020-06-28 0.9098 0.7523 0.573 0.672
2020-06-29 0.9143 0.6959 0.3421 0.1491
2020-06-30 0.2511 0.6313 0.9313 0.14
2020-07-01 0.9774 0.3955 0.8392 0.0142
2020-07-02 0.0961 0.1851 0.2567 0.8728
2020-07-03 0.7827 0.5948 0.12 0.6628
2020-07-04 0.4327 0.0303 0.7383 0.628
2020-07-05 0.8772 0.462 0.9595 0.2959
2020-07-06 0.7684 0.5016 0.7627 0.4249
2020-07-07 0.9006 0.4791 0.7409 0.0413
2020-07-08 0.9629 0.7901 0.5071 0.9711
2020-07-09 0.1149 0.2433 0.9242 0.376
2020-07-10 0.7813 0.2351 0.2312 0.459
2020-07-11 0.4592 0.0172 0.0301 0.8592
2020-07-12 0.0127 0.0435 0.5869 0.0521
2020-07-13 0.4127 0.9581 0.0893 0.7118
2020-07-14 0.0711 0.9451 0.3769 0.862
2020-07-15 0.5912 0.5112 0.0936 0.7683
2020-07-16 0.6777 0.7085 0.7081 0.4689
1x4 TS{Float64,Date}: 2019-11-08 to 2019-11-08

Index A B C D
2019-11-08 0.8085 0.6463 0.739 0.1027

Test Summary: | Pass Total
Initialization | 1528 1528
Test Summary: | Pass Total
Rename | 15 15
Test Summary: | Pass Total
Subsetting | 83 83
Test Summary: | Pass Total
Mutating | 35 35
Test Summary: | Pass Total
Combining | 25 25
Test Summary: | Pass Total
Operations | 64 64
Test Summary: | Pass Total
Filtering | 16 16
Test Summary: | Pass Total
OHLC | 22 22
Test Summary: | Pass Total
Collapsing | 19 19
Test Summary: | Pass Total
Conversion | 6 6
Test Summary: | Pass Broken Total
Input/Output | 6 2 8
Testing Temporal tests passed
`
Thank you in advance for any help. I realise that this must be a problem unique to me as it has not been reported by anyone else and is a very simple example.

@dysonance
Copy link
Owner

@GHTaarn I think the Quandl code you are using here might be mis-specified? That is, I don't think "AAPL" is a valid Quandl data code. Could you try it with e.g. "CHRIS/CME_CL1" (crude futures)?

@GHTaarn
Copy link
Author

GHTaarn commented Oct 12, 2020

Yes, when I use "CHRIS/CME1" or "WIKI/AAPL" then quandl works :) I am however still getting a stack trace when using the yahoo function with the example from the documentation:

X=yahoo("FB")

I don't have the stack trace here, but it is due to an "HTTP 405 Method Not Allowed" error. Is this because I need an authentication key? If so, then it would be helpful to update the documentation.

Thanks for your reply. As of now I do not need the yahoo function, so this is not urgent, I just wanted to alert your attention to the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants