llSourcell / Reinforcement_Learning_for_Stock_Prediction

This is the code for "Reinforcement Learning for Stock Prediction" By Siraj Raval on Youtube
640 stars 362 forks source link

Response malformed. #1

Closed colbyham closed 6 years ago

colbyham commented 6 years ago

D:\Anaconda\envs\tf-gpu\python.exe D:/GitHub/Reinforcement_Learning_for_Stock_Prediction/stock_predict.py Traceback (most recent call last): File "D:/GitHub/Reinforcement_Learning_for_Stock_Prediction/stock_predict.py", line 120, in get_prices stock_prices = np.load(cache_filename) File "D:\Anaconda\envs\tf-gpu\lib\site-packages\numpy\lib\npyio.py", line 372, in load fid = open(file, "rb") FileNotFoundError: [Errno 2] No such file or directory: 'resource/stock_prices.npy'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Anaconda\envs\tf-gpu\lib\site-packages\yahoo_finance__init__.py", line 120, in request , results = response['query']['results'].popitem() AttributeError: 'NoneType' object has no attribute 'popitem'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Anaconda\envs\tf-gpu\lib\site-packages\yahoo_finance__init__.py", line 123, in _request raise YQLQueryError(response['error']['description']) KeyError: 'error'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:/GitHub/Reinforcement_Learning_for_Stock_Prediction/stock_predict.py", line 130, in prices = get_prices('MSFT', '2000-07-01', '2017-07-01', 'resource/stock_prices.npy') File "D:/GitHub/Reinforcement_Learning_for_Stock_Prediction/stock_predict.py", line 122, in get_prices share = Share(share_symbol) File "D:\Anaconda\envs\tf-gpu\lib\site-packages\yahoo_finance__init.py", line 178, in init self.refresh() File "D:\Anaconda\envs\tf-gpu\lib\site-packages\yahoo_finance__init.py", line 142, in refresh self.data_set = self._fetch() File "D:\Anaconda\envs\tf-gpu\lib\site-packages\yahoo_finance__init__.py", line 181, in _fetch data = super(Share, self)._fetch() File "D:\Anaconda\envs\tf-gpu\lib\site-packages\yahoo_finance\init__.py", line 134, in _fetch data = self._request(query) File "D:\Anaconda\envs\tf-gpu\lib\site-packages\yahoo_finance\init__.py", line 125, in _request raise YQLResponseMalformedError() yahoo_finance.YQLResponseMalformedError: Response malformed.

Process finished with exit code 1

llSourcell commented 6 years ago

my mistake for not testing this properly, i've been moving so fast. i went ahead and scrapped it and found a more dependable codebase. refresh