Unable to ingest Quandl Data Bundle Zipline 1.0.0

已查看 1,091 次
跳至第一个未读帖子

Peter Chan

未读,
2016年5月27日 05:36:402016/5/27
收件人 Zipline Python Opensource Backtester
Hi there

Getting the following errors trying to ingest the quandl data bundle:

QUANDL_API_KEY=<my api key was here> zipline ingest quandl 
'QUANDL_API_KEY' is not recognized as an internal or external command,
operable program or batch file.

zipline ingest quandl
C:\Anaconda3\envs\py34\lib\site-packages\pandas\io\data.py:33: FutureWarning: 
The pandas.io.data module is moved to a separate package (pandas-datareader) and will be removed from pandas in a future version.
After installing the pandas-datareader package (https://github.com/pydata/pandas-datareader), you can change the import ``from pandas.io import data, wb`` to ``from pandas_datareader import data, wb``.
  FutureWarning)
Usage: zipline-script.py ingest [OPTIONS]

Error: Got unexpected extra argument (quandl)

Thanks

Peter

Joe Jevnik

未读,
2016年6月7日 15:10:592016/6/7
收件人 Zipline Python Opensource Backtester
For ingest you should pass the name with the `-b` flag like: `$ zipline ingest -b quandl`. You might also want to use the quantopian-quandl bundle (which is the defaualt) because we have dealt with the rate-limiting for you.

Joe Jevnik

未读,
2016年6月7日 15:17:252016/6/7
收件人 Zipline Python Opensource Backtester
Also, I didn't see it the first time but it looks like you are using batch and the code snippet there is bash. The first line is trying to pass some environment variables to the program inline, but for batch I am not sure what the syntax is.

Peter Chan

未读,
2016年6月8日 01:26:062016/6/8
收件人 Joe Jevnik、Zipline Python Opensource Backtester
Yes I'm on win10 so using batch.  From http://superuser.com/questions/223104/setting-environment-variable-for-just-one-command-in-windows-cmd-exe I think the equivalent command is 
cmd /V /C "set "QUANDL_API_KEY=<api-key>" && zipline ingest -b quandl"

C:\Anaconda3\envs\py34\lib\site-packages\pandas\io\data.py:33: FutureWarning:
The pandas.io.data module is moved to a separate package (pandas-datareader) and will be removed from pandas in a future
 version.
After installing the pandas-datareader package (https://github.com/pydata/pandas-datareader), you can change the import
``from pandas.io import data, wb`` to ``from pandas_datareader import data, wb``.
  FutureWarning)
Traceback (most recent call last):
  File "C:\Anaconda3\envs\py34\Scripts\zipline-script.py", line 9, in <module>
    load_entry_point('zipline==1.0.0', 'console_scripts', 'zipline')()
  File "C:\Anaconda3\envs\py34\lib\site-packages\click\core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "C:\Anaconda3\envs\py34\lib\site-packages\click\core.py", line 696, in main
    rv = self.invoke(ctx)
  File "C:\Anaconda3\envs\py34\lib\site-packages\click\core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Anaconda3\envs\py34\lib\site-packages\click\core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Anaconda3\envs\py34\lib\site-packages\click\core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "C:\Anaconda3\envs\py34\lib\site-packages\zipline\__main__.py", line 300, in ingest
    show_progress,
  File "C:\Anaconda3\envs\py34\lib\site-packages\zipline\data\bundles\core.py", line 358, in ingest
    overwrite=True,
  File "C:\Anaconda3\envs\py34\lib\site-packages\zipline\data\us_equity_pricing.py", line 824, in __init__
    self.conn = sqlite3.connect(conn_or_path)
sqlite3.OperationalError: unable to open database file

Which I think is related to the known issue on Windows using the yahoo bundle.

Also the docs aren't clear, cos on the one hand it says "By default zipline comes with the quandl data bundle which uses quandl’s WIKI dataset"
then below it says pretty much the same thing for the quantopian-quandl bundle "This is available under the name: quantopian-quandl and is the default bundle for zipline"

Anyway, in the meantime I'll use the quantopian-quandl bundle which I had no issues ingesting on win10.  Thanks.


--
You received this message because you are subscribed to the Google Groups "Zipline Python Opensource Backtester" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zipline+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

回复全部
回复作者
转发
0 个新帖子