insipx / polkadot-rewards

Simple CLI App to crawl staking rewards for Kusama, Polkadot, and Moonriver from Subscan
MIT License
37 stars 12 forks source link

Failed to read JSON #98

Closed TriplEight closed 2 years ago

TriplEight commented 2 years ago

How do I debug/work around the following issue:

$ polkadot-rewards --from "2020-01-01 00:00:00" --to "2020-12-31 23:59:59" --network "DOT" --address "xx" --currency "eur"
Error: Failed to fetch prices.

Caused by:
    Failed to read JSON: missing field `market_data` at line 1 column 810
insipx commented 2 years ago

subscan or coingecko API JSON format probably changed, I will push a fix in the next 24 hours or so and a new version to fix this

TriplEight commented 2 years ago

I think I figured it, I was including the dates when polkadot was not yet launched, starting --from "2020-08-19 00:00:00" solved my problem

TriplEight commented 2 years ago

then it could've been just handled gracefully

insipx commented 2 years ago

Ah i see, glad you found a solution

can i consider this issue solved then?