llSourcell/Reinforcement_Learning_for_Stock_Prediction

Response malformed.

Closed this issue · 1 comments

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

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