Skip to content

Unable to Extract stock data from Morningstar #557

Closed
@allenwu25

Description

@allenwu25

I'm a beginner in python working with stock data. This morning I was able to extract stock data from the morningstar website fine, however when I try to do so now I receive the following error message shown below. What could be causing this issue and what can I do to fix it? Thanks

Exception Traceback (most recent call last)
in ()
63 '''
64
---> 65 df=web.DataReader('MMM','morningstar', start, end)
66 print(df)
67 stockname=df.to_csv('mmm.csv')

~\Documents\New folder (2)\lib\site-packages\pandas_datareader\data.py in DataReader(name, data_source, start, end, retry_count, pause, session, access_key)
389 return MorningstarDailyReader(symbols=name, start=start, end=end,
390 retry_count=retry_count, pause=pause,
--> 391 session=session, interval="d").read()
392 elif data_source == 'robinhood':
393 return RobinhoodHistoricalReader(symbols=name, start=start, end=end,

~\Documents\New folder (2)\lib\site-packages\pandas_datareader\mstar\daily.py in read(self)
217 "type %s" % type(self.symbols))
218
--> 219 df = self._dl_mult_symbols(symbols=symbols)
220 if len(df.index.levels[0]) == 0:
221 raise ValueError("None of the provided symbols were valid")

~\Documents\New folder (2)\lib\site-packages\pandas_datareader\mstar\daily.py in _dl_mult_symbols(self, symbols)
128 else:
129 raise Exception("Request Error!: %s : %s" % (
--> 130 resp.status_code, resp.reason))
131
132 time.sleep(self.pause)

Exception: Request Error!: 404 : Not Found

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