You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since 17.10.19 it seems that for some token price queries in cryptocompare an empty object {} is returned which does not seem to agree with the API documentation and leads to a crash.
The crash was seen by a Rotki user and looks like this in the logs:
17/10/2019 13:28:56 +08 -- DEBUG:rotkehlchen.inquirer:Get usd price from cryptocompare asset=WETH
17/10/2019 13:28:57 +08 -- ERROR:rotkehlchen.server:Greenlet for task 2 dies with exception: 'Response'.
Exception Name: <class 'KeyError'>
Exception Info: 'Response'
Traceback:
File "src/gevent/greenlet.py", line 716, in gevent._greenlet.Greenlet.run
File "rotkehlchen/server.py", line 132, in _query_async
File "rotkehlchen/server.py", line 370, in query_balances
File "rotkehlchen/rotkehlchen.py", line 368, in query_balances
File "rotkehlchen/utils/misc.py", line 109, in wrapper
File "rotkehlchen/blockchain.py", line 86, in query_balances
File "rotkehlchen/blockchain.py", line 405, in query_ethereum_balances
File "rotkehlchen/blockchain.py", line 354, in query_ethereum_tokens
File "rotkehlchen/inquirer.py", line 133, in find_usd_price
File "rotkehlchen/inquirer.py", line 49, in query_cryptocompare_for_fiat_price
17/10/2019 13:29:38 +08 -- DEBUG:rotkehlchen.rotkehlchen:Main loop start
17/10/2019 13:29:38 +08 -- DEBUG:rotkehlchen.rotkehlchen:Main loop end
An example of the offending cryptocompare API request is this:
{"Response":"Error","Message":"There is no data for the symbol XXXX .","HasWarning":false,"Type":2,"RateLimit":{},"Data":{},"ParamWithError":"fsym"}
The unexpected empty object leads to a crash of Rotki, so it's important to fix.
Task
After talking with @vcealicu I confirmed this is a bug on the cryptocompare side so it should eventually go away on its own.
But the fact of the matter remains that any such unexpected answer should not crash the Rotki application. So we just need to handle the empty object return.
The text was updated successfully, but these errors were encountered:
Problem Definition
Since 17.10.19 it seems that for some token price queries in cryptocompare an empty object
{}
is returned which does not seem to agree with the API documentation and leads to a crash.The crash was seen by a Rotki user and looks like this in the logs:
An example of the offending cryptocompare API request is this:
https://min-api.cryptocompare.com/data/price?fsym=WETH&tsyms=USD
which returns
{}
Normally for non-existing tokens or tokens for which data does not exist a proper error is returned like here:
https://min-api.cryptocompare.com/data/price?fsym=XXXX&tsyms=USD
{"Response":"Error","Message":"There is no data for the symbol XXXX .","HasWarning":false,"Type":2,"RateLimit":{},"Data":{},"ParamWithError":"fsym"}
The unexpected empty object leads to a crash of Rotki, so it's important to fix.
Task
After talking with @vcealicu I confirmed this is a bug on the cryptocompare side so it should eventually go away on its own.
But the fact of the matter remains that any such unexpected answer should not crash the Rotki application. So we just need to handle the empty object return.
The text was updated successfully, but these errors were encountered: