tellor-io / disputable-values-monitor

console & text alerts for possibly bad data reported to Tellor oracles
3 stars 4 forks source link

UnboundLocalError: local variable 'price' referenced before assignment #25

Closed 0xSpuddy closed 2 years ago

0xSpuddy commented 2 years ago

running commit 53864bbbbaf6758fff6379d0ab1daa0c41c32d05 (this morning)

Disputable Values Monitor 📒🔎📲
|    |       When | Transaction                                                                                | Asset   | Currency   |   Value | Disputable   |
|---:|-----------:|:-------------------------------------------------------------------------------------------|:--------|:-----------|--------:|:-------------|
|  0 | 1660058687 | https://etherscan.io/tx/0x1cde0c60e2ad9d833603f0cbd011024520dfe2e65ced370088c7d4084dad8f60 | ETH     | USD        | 1693.99 | no ✔️        |
|  1 | 1660059343 | https://etherscan.io/tx/0xce76068c7464e84bf7ae05ce2919df0de5d1f7762eea9efd3f928561d3fa7efd | ETH     | USD        | 1691.09 | no ✔️        |
Error parsing Coingecko API response: KeyError: 'ethereum'6e6efaaa36160cc2681bd3561281e2cce2d369096ccddc2e49de | ETH     | USD        | 1690.39 | no ✔️        |
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ubuntu/disputable-values-monitor/src/tellor_disputables/cli.py", line 134, in main
    cli()
  File "/home/ubuntu/disputable-values-monitor/src/tellor_disputables/cli.py", line 75, in cli
    new_report = parse_new_report_event(event, eth_web3, eth_contract)
  File "/home/ubuntu/disputable-values-monitor/src/tellor_disputables/data.py", line 225, in parse_new_report_event
    disputable = is_disputable(val, query_id, CONFIDENCE_THRESHOLD)
  File "/home/ubuntu/disputable-values-monitor/src/tellor_disputables/data.py", line 117, in is_disputable
    trusted_val = asyncio.run(current_feed.source.fetch_new_datapoint())[0]
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/home/ubuntu/env/lib/python3.10/site-packages/telliot_feed_examples/sources/price_aggregator.py", line 83, in fetch_new_datapoint
    datapoints = await self.update_sources()
  File "/home/ubuntu/env/lib/python3.10/site-packages/telliot_feed_examples/sources/price_aggregator.py", line 69, in update_sources
    inputs = await gather_inputs()
  File "/home/ubuntu/env/lib/python3.10/site-packages/telliot_feed_examples/sources/price_aggregator.py", line 64, in gather_inputs
    datapoints = await asyncio.gather(
  File "/home/ubuntu/env/lib/python3.10/site-packages/telliot_core/pricing/price_source.py", line 32, in fetch_new_datapoint
    datapoint = await self.service.get_price(self.asset, self.currency)
  File "/home/ubuntu/env/lib/python3.10/site-packages/telliot_feed_examples/sources/coingecko.py", line 72, in get_price
    return price, datetime_now_utc()
UnboundLocalError: local variable 'price' referenced before assignment
tallywiesenberg commented 2 years ago

Might be from an outdated version of telliot-feeds. Will keep an eye out for it, please re-open if this error shows up again with newer telliot-feeds