Skip to content

KeyError: 'market_data' #24

Description

@furmanlukasz

I'm geting this error while trying to get data from foundation nft contract

Updating block-to-date mapping...
Updating ETH prices...
{'id': 'ethereum', 'symbol': 'eth', 'name': 'Ethereum', 'localization': {'en': 'Ethereum', 'de': 'Ethereum', 'es': 'Ethereum', 'fr': 'Ethereum', 'it': 'Ethereum', 'pl': 'Ethereum', 'ro': 'Ethereum', 'hu': 'Ethereum', 'nl': 'Ethereum', 'pt': 'Ethereum', 'sv': 'Ethereum', 'vi': 'Ethereum', 'tr': 'Ethereum', 'ru': 'Эфириум', 'ja': 'イーサリアム', 'zh': '以太坊', 'zh-tw': '以太幣', 'ko': '이더리움', 'ar': 'يثريوم', 'th': 'Ethereum', 'id': 'Ethereum', 'cs': 'Ethereum', 'da': 'Ethereum', 'el': 'Ethereum', 'hi': 'Ethereum', 'no': 'Ethereum', 'sk': 'Ethereum', 'uk': 'Ethereum', 'he': 'Ethereum', 'fi': 'Ethereum', 'bg': 'Ethereum', 'hr': 'Ethereum', 'lt': 'Ethereum', 'sl': 'Ethereum'}, 'image': {'thumb': 'https://assets.coingecko.com/coins/images/279/thumb/ethereum.png?1595348880', 'small': 'https://assets.coingecko.com/coins/images/279/small/ethereum.png?1595348880'}} 777
Traceback (most recent call last):
  File "/Users/luki/Documents/GitHub/nft-analyst-starter-pack/export_data.py", line 225, in <module>
    export_data()
  File "/Users/luki/opt/anaconda3/envs/dask-env/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/Users/luki/opt/anaconda3/envs/dask-env/lib/python3.9/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/Users/luki/opt/anaconda3/envs/dask-env/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/luki/opt/anaconda3/envs/dask-env/lib/python3.9/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/Users/luki/Documents/GitHub/nft-analyst-starter-pack/export_data.py", line 173, in export_data
    update_eth_prices(filename=eth_prices_csv)
  File "/Users/luki/Documents/GitHub/nft-analyst-starter-pack/jobs/update_eth_prices.py", line 48, in update_eth_prices
    price_of_eth = j["market_data"]["current_price"]["usd"]
KeyError: 'market_data'

python export_data.py --alchemy-api-key APIKEY --contract-address 0x7498aCde901d950B823DDBe302E1B2daD41Cc308

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions