Skip to content

TypeError: 'NoneType' object is not subscriptable #130

@sugizo

Description

@sugizo

code

from cryptocmd import CmcScraper
scraper = CmcScraper(crypto, start_date, end_date)
scraper.get_data()

result

Error fetching coin id data for coin code BTC
Error message: Expecting value: line 1 column 1 (char 0)
Error fetching price data for BTC for interval '21-12-2021' and '29-12-2021'
Error message (download_data) : Expecting value: line 1 column 1 (char 0)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
[<ipython-input-8-a93c11da712a>](https://localhost:8080/#) in <cell line: 0>()
----> 1 scraper.get_data()

1 frames
[/usr/local/lib/python3.11/dist-packages/cryptocmd/core.py](https://localhost:8080/#) in _download_data(self, **kwargs)
     94         )
     95 
---> 96         for _row in coin_data["data"]["quotes"]:
     97 
     98             _row_quote = list(_row["quote"].values())[0]

TypeError: 'NoneType' object is not subscriptable

best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions