Open XingLiuJia opened 5 years ago
another fork repo, has the downloaded data already. https://github.com/jimenbian/stock-rnn
another fork repo, has the downloaded data already. https://github.com/jimenbian/stock-rnn
when i run python main.py --stock_symbol=SP500 --train --input_size=1 --lstm_size=128 --max_epoch=50
Traceback (most recent call last):
File "main.py", line 9, in
another fork repo, has the downloaded data already. https://github.com/jimenbian/stock-rnn
when i run python main.py --stock_symbol=SP500 --train --input_size=1 --lstm_size=128 --max_epoch=50
Traceback (most recent call last): File "main.py", line 9, in from model_rnn import LstmRNN File "/root/stock/model_rnn.py", line 135 print "len(merged_test_X) =", len(merged_test_X) ^ SyntaxError: invalid syntax
Probably, you are using a Python 3 environment, while apparently this part of code is Python 2. Some minor adjustment is recommended. Won't take you much time.
/media/scw4750/个人文件/donghui/stock-rnn-master/data_fetcher.py:38: FutureWarning: sort(columns=....) is deprecated, use sort_values(by=.....) Loaded 505 stock symbols df_sp500.sort('Market Cap', ascending=False, inplace=True) Fetching AAPL ... https://finance.google.com/finance/historical?output=csv&q=AAPL&startdate=Jan+1%2C+1980&enddate=Jan+10%2C+2019 Traceback (most recent call last): File "/media/scw4750/个人文件/donghui/stock-rnn-master/data_fetcher.py", line 111, in
main()
File "/home/scw4750/anaconda2-caffe/lib/python2.7/site-packages/click/core.py", line 716, in call
return self.main(args, kwargs)
File "/home/scw4750/anaconda2-caffe/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/home/scw4750/anaconda2-caffe/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/home/scw4750/anaconda2-caffe/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(args, *kwargs)
File "/media/scw4750/个人文件/donghui/stock-rnn-master/data_fetcher.py", line 103, in main
succeeded = fetch_prices(sym, out_name)
File "/media/scw4750/个人文件/donghui/stock-rnn-master/data_fetcher.py", line 65, in fetch_prices
f = urllib2.urlopen(symbol_url)
File "/home/scw4750/anaconda2-caffe/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/home/scw4750/anaconda2-caffe/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/home/scw4750/anaconda2-caffe/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/home/scw4750/anaconda2-caffe/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(args)
File "/home/scw4750/anaconda2-caffe/lib/python2.7/urllib2.py", line 1241, in https_open
context=self._context)
File "/home/scw4750/anaconda2-caffe/lib/python2.7/urllib2.py", line 1198, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 101] Network is unreachable>
Process finished with exit code 1