panifie/PingPong.jl

bn.binanceload() load nothing

Closed this issue · 1 comments

The download progress bar continued for a while and downloaded a lot of data, but it couldn't load. Additionally, where are the downloaded files stored? Are there any temporary files that need to be cleaned up?

julia> bn.binancedownload("eth", market=:data, freq=:monthly, kind=:klines)
(download progressbar showup for a while)

julia> bn.binanceload("eth", market=:data, freq=:monthly, kind=:klines)
Data.PairData("ETHUSDT_data_klines", "1m", 0×6 DataFrame
 Row │ timestamp  open     high     low      close    volume
     │ DateTime   Float64  Float64  Float64  Float64  Float64
─────┴────────────────────────────────────────────────────────, ZArray{Float64} of size 0 x 6)

If I change the parameter :data to :um,, the data loads successfully. It appears that the :data downloaded is saved in the :um directory.

julia> bn.binanceload("eth", market=:um, freq=:monthly, kind=:klines)
Data.PairData("ETHUSDT_um_klines", "1m", 3570959×6 DataFrame
     Row │ timestamp            open     high     low      close    volume
         │ DateTime             Float64  Float64  Float64  Float64  Float64
─────────┼─────────────────────────────────────────────────────────────────────
       1 │ 2017-08-17T04:01:00   301.13   301.13   301.13   301.13     2.75787
       2 │ 2017-08-17T04:02:00   300.0    300.0    300.0    300.0      0.0993
       3 │ 2017-08-17T04:03:00   300.0    300.0    300.0    300.0      0.31389
       4 │ 2017-08-17T04:04:00   301.13   301.13   301.13   301.13     0.23202
       5 │ 2017-08-17T04:05:00   300.0    301.13   300.0    301.13     0.75705
       6 │ 2017-08-17T04:06:00   300.1    300.1    300.1    300.1      0.90018
       7 │ 2017-08-17T04:07:00   300.1    300.1    300.1    300.1      0.0
       8 │ 2017-08-17T04:08:00   300.1    300.1    298.0    298.0      0.31493
       9 │ 2017-08-17T04:09:00   298.0    298.0    298.0    298.0      0.0
      10 │ 2017-08-17T04:10:00   298.0    298.0    298.0    298.0      0.0
      11 │ 2017-08-17T04:11:00   298.0    298.0    298.0    298.0      0.0
      12 │ 2017-08-17T04:12:00   298.0    298.0    298.0    298.0      0.0
      13 │ 2017-08-17T04:13:00   298.0    298.0    298.0    298.0      0.0
    ⋮    │          ⋮              ⋮        ⋮        ⋮        ⋮         ⋮

The fix has introduced new issues. The previously working download function has stopped working.

julia> using Scrapers: Scrapers as scr, BinanceData as bn

julia> bn.binancedownload("eth", market=:data, freq=:monthly, kind=:klines)

┌ Warning: XMLError: Tag nav invalid from HTML parser (code: 801, line: 8)
└ @ EzXML ~/.julia/packages/EzXML/DL8na/src/error.jl:97
┌ Warning: XMLError: Tag svg invalid from HTML parser (code: 801, line: 17)
└ @ EzXML ~/.julia/packages/EzXML/DL8na/src/error.jl:97
┌ Warning: XMLError: Tag path invalid from HTML parser (code: 801, line: 18)
└ @ EzXML ~/.julia/packages/EzXML/DL8na/src/error.jl:97

┌ Warning: binance: download failed (or up to date)
│   sym = "ETHUSDT"
│   last_file = nothing