Skip to content

TypeError #986

Open
Open
@RobKang1234

Description

@RobKang1234

My code:
from pandas_datareader import data as web
result = web.DataReader('GOOG', 'yahoo', start='2023-09-10', end='2023-10-10')

ERROR:
Traceback (most recent call last):
File "/Users/robkang/Documents/StrategyResearch/test.py", line 3, in
result = web.DataReader('GOOG', 'yahoo', start='2023-09-10', end='2023-10-10')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/robkang/Documents/StrategyResearch/env/lib/python3.12/site-packages/pandas/util/_decorators.py", line 213, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/robkang/Documents/StrategyResearch/env/lib/python3.12/site-packages/pandas_datareader/data.py", line 384, in DataReader
).read()
^^^^^^
File "/Users/robkang/Documents/StrategyResearch/env/lib/python3.12/site-packages/pandas_datareader/base.py", line 246, in read
df = self._read_one_data(self.url, params=self._get_params(self.symbols))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/robkang/Documents/StrategyResearch/env/lib/python3.12/site-packages/pandas_datareader/yahoo/daily.py", line 151, in _read_one_data
data = j["context"]["dispatcher"]["stores"]["HistoricalPriceStore"]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: string indices must be integers, not 'str'

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