Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
run examples/buyapple.py got ERROR: Loader: failed to cache the new benchmark returns

/home/kevinyuan/dev/zipline> bin/zipline ingest Downloading Bundle: quantopian-quandl [####################################] 100%
Writing data to /home/kevinyuan/.zipline/data/quantopian-quandl/2017-05-01T16;36;49.048566.

/home/kevinyuan/dev/zipline> bin/zipline run -f examples/buyapple.py -s 2000-1-1 -e 2001-12-31 [2017-05-01 16:33:28.023652] INFO: Loader: Cache at /home/kevinyuan/.zipline/data/^GSPC_benchmark.csv does not have data from 1990-01-02 00:00:00+00:00 to 2017-04-27 00:00:00+00:00. Downloading benchmark data for '^GSPC'.
[2017-05-01 16:33:28.076307] ERROR: Loader: failed to cache the new benchmark returns Traceback (most recent call last):
File "/share/dev/tools/lib/python3.5/urllib/request.py", line 1240, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/share/dev/tools/lib/python3.5/http/client.py", line 1083, in request
self.send_request(method, url, body, headers)
File "/share/dev/tools/lib/python3.5/http/client.py", line 1128, in send_request
self.endheaders(body)
File "/share/dev/tools/lib/python3.5/http/client.py", line 1079, in endheaders
self._send_output(message_body)
File "/share/dev/tools/lib/python3.5/http/client.py", line 911, in _send
output
self.send(msg)
File "/share/dev/tools/lib/python3.5/http/client.py", line 854, in send
self.connect()
File "/share/dev/tools/lib/python3.5/http/client.py", line 1237, in connect
server
hostname=server_hostname)
File "/share/dev/tools/lib/python3.5/ssl.py", line 376, in wrap_socket
context=self)
File "/share/dev/tools/lib/python3.5/ssl.py", line 747, in __init
_
self.do_handshake()
File "/share/dev/tools/lib/python3.5/ssl.py", line 983, in do_handshake
self.sslobj.do_handshake()
File "/share/dev/tools/lib/python3.5/ssl.py", line 628, in do_handshake
self._sslobj.do
handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/zipline/data/loader.py", line 247, in ensure_benchmark_data
last_date,
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/zipline/data/benchmarks.py", line 59, in get_benchmark_returns
squeeze=True, # squeeze tells pandas to make this a Series
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/pandas/io/parsers.py", line 562, in parser_f
return read(filepath_or_buffer, kwds)
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/pandas/io/parsers.py", line 301, in read
compression=kwds.get('compression', None))
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/pandas/io/common.py", line 308, in get_filepath_or_buffer
req = urlopen(str(filepath_or_buffer))
File "/share/dev/tools/lib/python3.5/urllib/request.py", line 162, in urlopen
return opener.open(url, data, timeout)
File "/share/dev/tools/lib/python3.5/urllib/request.py", line 465, in open
response = self.
open(req, data)
File "/share/dev/tools/lib/python3.5/urllib/request.py", line 483, in _open
'_open', req)
File "/share/dev/tools/lib/python3.5/urllib/request.py", line 443, in _call
chain
result = func(*args)
File "/share/dev/tools/lib/python3.5/urllib/request.py", line 1283, in https_open
context=self.context, check_hostname=self.check_hostname)
File "/share/dev/tools/lib/python3.5/urllib/request.py", line 1242, in do
open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE
VERIFY_FAILED] certificate verify failed (_ssl.c:645)>
Traceback (most recent call last):
File "/share/dev/tools/lib/python3.5/urllib/request.py", line 1240, in do
open
h.request(req.get_method(), req.selector, req.data, headers)
File "/share/dev/tools/lib/python3.5/http/client.py", line 1083, in request
self.send_request(method, url, body, headers)
File "/share/dev/tools/lib/python3.5/http/client.py", line 1128, in send_request
self.endheaders(body)
File "/share/dev/tools/lib/python3.5/http/client.py", line 1079, in endheaders
self._send_output(message_body)
File "/share/dev/tools/lib/python3.5/http/client.py", line 911, in _send
output
self.send(msg)
File "/share/dev/tools/lib/python3.5/http/client.py", line 854, in send
self.connect()
File "/share/dev/tools/lib/python3.5/http/client.py", line 1237, in connect
server
hostname=server_hostname)
File "/share/dev/tools/lib/python3.5/ssl.py", line 376, in wrap_socket
context=self)
File "/share/dev/tools/lib/python3.5/ssl.py", line 747, in __init
_
self.do_handshake()
File "/share/dev/tools/lib/python3.5/ssl.py", line 983, in do_handshake
self.sslobj.do_handshake()
File "/share/dev/tools/lib/python3.5/ssl.py", line 628, in do_handshake
self._sslobj.do
handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "bin/zipline", line 11, in
sys.exit(main())
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/click/core.py", line 722, in call
return self.main(args, **kwargs)
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, *ctx.params)
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(
args, **kwargs)
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/zipline/
main.py", line 97, in _
return f(args, **kwargs)
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, *
kwargs)
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/zipline/
main.py", line 240, in run
environ=os.environ,
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/zipline/utils/run_algo.py", line 132, in run
env = TradingEnvironment(asset_db_path=connstr)
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/zipline/finance/trading.py", line 101, in _
init
_
self.bm_symbol,
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/zipline/data/loader.py", line 164, in load_market_data
trading_day,
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/zipline/data/loader.py", line 247, in ensure_benchmark_data
last_date,
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/zipline/data/benchmarks.py", line 59, in get_benchmark_returns
squeeze=True, # squeeze tells pandas to make this a Series
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/pandas/io/parsers.py", line 562, in parser_f
return read(filepath_or_buffer, kwds)
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/pandas/io/parsers.py", line 301, in _read
compression=kwds.get('compression', None))
File "/home-tahoe-n2/kevinyuan/dev/zipline/lib/python3.5/site-packages/pandas/io/common.py", line 308, in get_filepath_or_buffer
req = _urlopen(str(filepath_or_buffer))
File "/share/dev/tools/lib/python3.5/urllib/request.py", line 162, in urlopen
return opener.open(url, data, timeout)
File "/share/dev/tools/lib/python3.5/urllib/request.py", line 465, in open
response = self.
open(req, data)
File "/share/dev/tools/lib/python3.5/urllib/request.py", line 483, in open
'_open', req)
File "/share/dev/tools/lib/python3.5/urllib/request.py", line 443, in _call
chain
result = func(
args)
File "/share/dev/tools/lib/python3.5/urllib/request.py", line 1283, in https_open
context=self.context, check_hostname=self.check_hostname)
File "/share/dev/tools/lib/python3.5/urllib/request.py", line 1242, in do
open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE
VERIFY_FAILED] certificate verify failed (_ssl.c:645)>