quantopian / zipline

Zipline, a Pythonic Algorithmic Trading Library
https://www.zipline.io
Apache License 2.0
17.75k stars 4.74k forks source link

Zipline Ingest -b quantdl ISSUE [Thank you very much!!!] #2850

Open BirdyLiu6471023 opened 1 year ago

BirdyLiu6471023 commented 1 year ago

Dear Zipline Maintainers,

Before I tell you about my issue, let me describe my environment:

Environment

* Operating System: MacOS * Python Version: 3.8.5 * Python Bitness: 64 * How did you install Zipline: pip * Python packages: absl-py==1.2.0 access==1.1.8 affine==2.3.1 alabaster==0.7.12 ale-py==0.7.4 alembic==1.11.1 anaconda-client==1.7.2 anaconda-navigator==1.10.0 anaconda-project==0.8.3 anndata==0.8.0 anndata2ri==1.1 anyio==3.6.2 appdirs==1.4.4 applaunchservices==0.2.1 appnope @ file:///opt/concourse/worker/volumes/live/0291c9e1-4b15-459f-623e-2770f55be269/volume/appnope_1594338395037/work appscript @ file:///opt/concourse/worker/volumes/live/50ca4c96-3090-40bb-6981-3a6114ed0af4/volume/appscript_1594840187551/work argh==0.26.2 argon2-cffi @ file:///opt/concourse/worker/volumes/live/59af29ac-4890-416e-7ab7-794f8d6f7ecd/volume/argon2-cffi_1596828548321/work asn1crypto @ file:///tmp/build/80754af9/asn1crypto_1596577642040/work astroid @ file:///opt/concourse/worker/volumes/live/21fd14a9-2a7e-484b-7394-5a9912cdcf80/volume/astroid_1592498459180/work astropy==4.0.2 astunparse==1.6.3 async-generator==1.10 atomicwrites==1.4.0 attrs @ file:///tmp/build/80754af9/attrs_1604765588209/work autopep8 @ file:///tmp/build/80754af9/autopep8_1596578164842/work AutoROM==0.6.1 AutoROM.accept-rom-license==0.6.1 aws-requests-auth==0.4.3 Babel @ file:///tmp/build/80754af9/babel_1605108370292/work backcall==0.2.0 backports.functools-lru-cache==1.6.1 backports.shutil-get-terminal-size==1.0.0 backports.tempfile==1.0 backports.weakref==1.0.post1 backports.zoneinfo==0.2.1 bcolz-zipline==1.2.6 beautifulsoup4==4.12.2 bitarray @ file:///opt/concourse/worker/volumes/live/fdfca23e-4dd8-48f7-512d-c4f3db552eeb/volume/bitarray_1605065128338/work bkcharts==0.2 bleach @ file:///tmp/build/80754af9/bleach_1600439572647/work blis==0.7.9 bokeh @ file:///opt/concourse/worker/volumes/live/b2253281-9b72-4dcb-624e-e22924b50435/volume/bokeh_1603297849453/work boto==2.49.0 boto3==1.24.75 botocore==1.27.75 Bottleneck==1.3.2 brotlipy==0.7.0 cachetools==5.2.0 camelot-py==0.10.1 catalogue==2.0.8 census==0.8.19 certifi==2020.6.20 cffi @ file:///opt/concourse/worker/volumes/live/b9607b09-b777-4ff7-53dc-287727eb8574/volume/cffi_1600699191154/work chardet==3.0.4 charset-normalizer==2.1.1 click==8.1.3 click-plugins==1.1.1 cligj==0.7.2 cloudpickle @ file:///tmp/build/80754af9/cloudpickle_1598884132938/work clyent==1.2.2 cmake==3.18.4 colorama @ file:///tmp/build/80754af9/colorama_1603211150991/work conda==22.9.0 conda-build==3.20.5 conda-package-handling @ file:///opt/concourse/worker/volumes/live/a7e34989-4c54-4cb6-4156-4e58ee270730/volume/conda-package-handling_1603018121300/work conda-verify==3.4.2 confection==0.0.4 config==0.5.1 contextily==1.2.0 contextlib2==0.6.0.post1 contourpy==1.0.5 cryptography==38.0.4 cycler==0.10.0 cykhash==2.0.0 cymem==2.0.7 Cython @ file:///opt/concourse/worker/volumes/live/6158b663-a4ca-4e19-7e05-8807e4f79146/volume/cython_1594835048880/work cytoolz==0.11.0 dask @ file:///tmp/build/80754af9/dask-core_1602083700509/work decorator==4.4.2 defusedxml==0.6.0 deprecation==2.1.0 diff-match-patch @ file:///tmp/build/80754af9/diff-match-patch_1594828741838/work distributed @ file:///opt/concourse/worker/volumes/live/bd66aa48-5cf5-4b60-6ed4-f204fff153f6/volume/distributed_1605066538557/work distro==1.8.0 docopt==0.6.2 docutils==0.16 docx==0.2.4 docx2python==2.6.3 dunamai==1.17.0 empyrical-reloaded==0.5.9 en-core-web-lg @ https://github.com/explosion/spacy-models/releases/download/en_core_web_lg-3.5.0/en_core_web_lg-3.5.0-py3-none-any.whl entrypoints==0.3 esda==2.4.3 et-xmlfile==1.0.1 exchange-calendars==4.2.8 fa2==0.3.5 Farama-Notifications==0.0.4 fastcache==1.1.0 fastjsonschema==2.16.3 filelock==3.0.12 Fiona==1.8.21 flake8 @ file:///tmp/build/80754af9/flake8_1601911421857/work Flask==2.1.0 Flask-WTF==1.1.1 flatbuffers==2.0.7 fonttools==4.37.2 frozendict==2.3.7 fsspec @ file:///tmp/build/80754af9/fsspec_1602684995936/work future==0.18.2 gast==0.4.0 geographiclib==1.52 geopandas==0.11.1 geopy==2.2.0 get_version==3.5.4 gevent @ file:///opt/concourse/worker/volumes/live/e6b243ce-c4b8-40bb-4934-ef3bf1c512f2/volume/gevent_1601397552921/work giddy==2.3.3 glob2==0.7 gmpy2==2.0.8 goatools==1.0.15 google-auth==2.11.1 google-auth-oauthlib==0.4.6 google-pasta==0.2.0 graphviz==0.20 greenlet==2.0.2 grpcio==1.49.1 gym==0.21.0 gymnasium==0.28.1 h5py==3.8.0 HeapDict==1.0.1 hide-code==0.7.0 html5lib @ file:///tmp/build/80754af9/html5lib_1593446221756/work idna @ file:///tmp/build/80754af9/idna_1593446292537/work igraph==0.10.4 imageio @ file:///tmp/build/80754af9/imageio_1594161405741/work imagesize==1.2.0 importlib-metadata==4.13.0 importlib-resources==5.12.0 inequality==1.0.0 iniconfig @ file:///tmp/build/80754af9/iniconfig_1602780191262/work intervaltree @ file:///tmp/build/80754af9/intervaltree_1598376443606/work ipykernel @ file:///opt/concourse/worker/volumes/live/88f541d3-5a27-498f-7391-f2e50ca36560/volume/ipykernel_1596206680118/work/dist/ipykernel-5.3.4-py3-none-any.whl ipython @ file:///opt/concourse/worker/volumes/live/26969e8f-c9f7-42dc-6ffb-b3effd424c49/volume/ipython_1604101242376/work ipython_genutils==0.2.0 ipywidgets @ file:///tmp/build/80754af9/ipywidgets_1601490159889/work iso3166==2.1.1 iso4217==1.11.20220401 isort @ file:///tmp/build/80754af9/isort_1602603989581/work itsdangerous==2.1.2 jax-jumpy==1.0.0 jdcal==1.4.1 jedi @ file:///opt/concourse/worker/volumes/live/1c5c293b-9147-4b4b-5a7f-d3f5eddb8470/volume/jedi_1592841952519/work Jinja2==3.1.2 jmespath==1.0.1 joblib==1.2.0 json5==0.9.5 jsonlines==1.2.0 jsonschema @ file:///tmp/build/80754af9/jsonschema_1602607155483/work jupyter==1.0.0 jupyter-console @ file:///tmp/build/80754af9/jupyter_console_1598884538475/work jupyter-events==0.6.3 jupyter_client==8.2.0 jupyter_core==5.3.0 jupyter_server==2.5.0 jupyter_server_terminals==0.4.4 jupyterlab==2.2.6 jupyterlab-pygments @ file:///tmp/build/80754af9/jupyterlab_pygments_1601490720602/work jupyterlab-server @ file:///tmp/build/80754af9/jupyterlab_server_1594164409481/work keras==2.10.0 Keras-Preprocessing==1.1.2 keyring @ file:///opt/concourse/worker/volumes/live/54fc3ec2-338b-44f5-5e13-d62afa6b5820/volume/keyring_1601490916376/work kiwisolver @ file:///opt/concourse/worker/volumes/live/b8936fa6-0e4b-47e7-4fb4-e02dbd4505ee/volume/kiwisolver_1604014598721/work korean-lunar-calendar==0.3.1 langcodes==3.3.0 lazy-object-proxy==1.4.3 leidenalg==0.9.1 libarchive-c==2.9 libclang==14.0.6 libpysal==4.6.2 llvmlite==0.34.0 locket==0.2.0 lru-dict==1.2.0 lxml==4.9.2 Mako==1.2.4 mapclassify==2.4.3 Markdown==3.4.1 markdown-it-py==2.2.0 MarkupSafe==2.1.2 matplotlib==3.6.0 mccabe==0.6.1 mdurl==0.1.2 mercantile==1.2.1 mglearn==0.1.9 mgwr==2.1.2 missingno==0.5.1 mistune @ file:///opt/concourse/worker/volumes/live/95802d64-d39c-491b-74ce-b9326880ca54/volume/mistune_1594373201816/work mkl-fft==1.2.0 mkl-random==1.1.1 mkl-service==2.3.0 mock==4.0.2 momepy==0.5.3 more-itertools @ file:///tmp/build/80754af9/more-itertools_1605111547926/work mpmath==1.1.0 msgpack==1.0.0 MulticoreTSNE==0.1 multipledispatch==0.6.0 multitasking==0.0.11 munch==2.5.0 murmurhash==1.0.9 natsort==8.2.0 navigator-updater==0.2.1 nbclassic==0.5.6 nbclient @ file:///tmp/build/80754af9/nbclient_1602783176460/work nbconvert==6.5.4 nbformat==5.8.0 nest-asyncio==1.5.6 networkx==2.8.6 nltk @ file:///tmp/build/80754af9/nltk_1592496090529/work nose @ file:///opt/concourse/worker/volumes/live/a029938e-1732-4cd8-5b98-0542283d158b/volume/nose_1594377915100/work notebook==6.5.4 notebook_shim==0.2.3 numba @ file:///opt/concourse/worker/volumes/live/ae24c1ca-d916-4043-5919-a843fa33e451/volume/numba_1600084276085/work numexpr==2.8.4 numpy==1.23.3 numpydoc @ file:///tmp/build/80754af9/numpydoc_1605117425582/work oauthlib==3.2.1 olefile==0.46 opencv-contrib-python==4.6.0.66 opencv-python==4.6.0.66 openpyxl @ file:///tmp/build/80754af9/openpyxl_1598113097404/work opt-einsum==3.3.0 osm==1.4 osmnx==1.2.2 packaging==21.3 pandas==1.5.3 pandas-datareader==0.10.0 pandocfilters @ file:///opt/concourse/worker/volumes/live/c330e404-216d-466b-5327-8ce8fe854d3a/volume/pandocfilters_1605120442288/work parso==0.7.0 partd==1.1.0 path @ file:///opt/concourse/worker/volumes/live/fcdf620c-46d6-4284-4c1e-5b8c3bc6c5c6/volume/path_1596907417277/work pathlib2 @ file:///opt/concourse/worker/volumes/live/de518564-0d9f-405e-472b-38136f0c2169/volume/pathlib2_1594381084269/work pathtools==0.1.2 pathy==0.10.1 patsy==0.5.3 pdfkit==1.0.0 pdfminer.six==20221105 pdfplumber==0.9.0 pep8==1.7.1 pexpect @ file:///opt/concourse/worker/volumes/live/8701bb20-ad87-46c7-5108-30c178cf97e5/volume/pexpect_1594383388344/work pickleshare @ file:///opt/concourse/worker/volumes/live/93ec39d8-05bb-4f84-7efc-98735bc39b70/volume/pickleshare_1594384101884/work Pillow==9.5.0 pkginfo==1.6.1 platformdirs==3.5.0 pluggy==0.13.1 ply==3.11 pointpats==2.2.0 praw==7.7.0 prawcore==2.3.0 preshed==3.0.8 prometheus-client==0.8.0 prompt-toolkit @ file:///tmp/build/80754af9/prompt-toolkit_1602688806899/work protobuf==3.19.5 psutil @ file:///opt/concourse/worker/volumes/live/ff72f822-991c-4030-4f3a-8c41d3ac4e4f/volume/psutil_1598370232375/work psycopg2-binary==2.9.6 ptyprocess==0.6.0 PuLP==2.6.0 py @ file:///tmp/build/80754af9/py_1593446248552/work py4j==0.10.9.5 pyasn1==0.4.8 pyasn1-modules==0.2.8 pyclusterprofiler==0.1.dev14 pycodestyle==2.6.0 pycosat==0.6.3 pycparser @ file:///tmp/build/80754af9/pycparser_1594388511720/work pycurl==7.43.0.6 pydantic==1.10.7 pydocstyle @ file:///tmp/build/80754af9/pydocstyle_1598885001695/work pydot==1.4.2 pyflakes==2.2.0 pygeos==0.13 pyglet==1.5.27 Pygments==2.15.0 pykalman==0.9.5 pylint @ file:///opt/concourse/worker/volumes/live/ed0164b6-bcc7-4f6b-7dd4-ad89660b5dcb/volume/pylint_1598624018129/work pyluach==2.2.0 pynndescent==0.5.8 pyodbc===4.0.0-unsupported pyOpenSSL==23.0.0 pyparsing==2.4.7 PyPDF2==2.12.1 pyproj==3.4.0 pyrobuf==0.9.3 pyrosm==0.6.1 pyrsistent @ file:///opt/concourse/worker/volumes/live/ff11f3f0-615b-4508-471d-4d9f19fa6657/volume/pyrsistent_1600141727281/work pysal==2.7.0 PySocks @ file:///opt/concourse/worker/volumes/live/85a5b906-0e08-41d9-6f59-084cee4e9492/volume/pysocks_1594394636991/work pyspark==3.3.1 pytest==0.0.0 python-dateutil==2.8.2 python-docx==0.8.11 python-dotenv==0.21.0 python-interface==1.6.1 python-json-logger==2.0.7 python-jsonrpc-server @ file:///tmp/build/80754af9/python-jsonrpc-server_1600278539111/work python-language-server @ file:///tmp/build/80754af9/python-language-server_1600454544709/work python-rapidjson==1.8 pythonds==1.2.1 pytz==2023.3 pytz-deprecation-shim==0.1.0.post0 PyWavelets @ file:///opt/concourse/worker/volumes/live/ea36e10f-66e8-43ae-511e-c4092764493f/volume/pywavelets_1601658378672/work PyYAML==5.3.1 pyzmq==25.0.2 QDarkStyle==2.8.1 QtAwesome @ file:///tmp/build/80754af9/qtawesome_1602272867890/work qtconsole @ file:///tmp/build/80754af9/qtconsole_1600870028330/work QtPy==1.9.0 quantecon==0.5.3 quilt3==5.0.0 randomly==0.1.5 rasterio==1.3.2 rasterstats==0.17.0 regex @ file:///opt/concourse/worker/volumes/live/7f106f75-0e11-45be-4c20-6b071e37c646/volume/regex_1602786678165/work requests==2.28.1 requests-futures==1.0.0 requests-oauthlib==1.3.1 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.3.3 rise @ file:///Users/runner/miniforge3/conda-bld/rise_1667498777521/work rope @ file:///tmp/build/80754af9/rope_1602264064449/work rpy2==3.5.1 rsa==4.9 Rtree==1.0.0 ruamel_yaml==0.15.87 rvlib==0.0.6 s3transfer==0.6.0 scanpy==1.9.2 scikit-image==0.17.2 scikit-learn==0.24.0 scipy @ file:///opt/concourse/worker/volumes/live/851446f6-a052-41c4-4243-67bb78999b49/volume/scipy_1604596178167/work seaborn @ file:///tmp/build/80754af9/seaborn_1600553570093/work segregation==2.3.1 Send2Trash==1.8.2 session-info==1.0.0 shap==0.41.0 Shapely==1.8.4 sharepathway==0.5.0 simplegeneric==0.8.1 simplejson==3.17.6 singledispatch @ file:///tmp/build/80754af9/singledispatch_1602523705405/work six @ file:///opt/concourse/worker/volumes/live/5b31cb27-1e37-4ca5-6e9f-86246eb206d2/volume/six_1605205320872/work sklearn==0.0.post1 slicer==0.0.7 smart-open==6.3.0 sniffio==1.3.0 snowballstemmer==2.0.0 snuggs==1.4.7 sodapy==2.2.0 sortedcollections==1.2.1 sortedcontainers==2.2.2 soupsieve==2.0.1 spacy==3.5.1 spacy-legacy==3.0.12 spacy-loggers==1.0.4 spaghetti==1.6.6 spglm==1.0.8 Sphinx @ file:///tmp/build/80754af9/sphinx_1597428793432/work sphinxcontrib-applehelp==1.0.2 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==1.0.3 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.4 sphinxcontrib-websupport @ file:///tmp/build/80754af9/sphinxcontrib-websupport_1597081412696/work spint==1.0.7 splot==1.1.5.post1 spopt==0.4.1 spreg==1.2.4 spvcm==0.3.0 spyder @ file:///opt/concourse/worker/volumes/live/93f52c11-6bc0-49a8-541e-aa5e1de1eadc/volume/spyder_1599056974853/work spyder-kernels @ file:///opt/concourse/worker/volumes/live/b4ec5b57-5b3c-42d0-7731-c0691f88ee81/volume/spyder-kernels_1599056790993/work SQLAlchemy==2.0.17 srsly==2.4.6 stable-baselines==2.10.2 stable-baselines3==1.8.0 statsmodels==0.14.0 stdlib-list==0.8.0 stockstats==0.5.2 svi-data==0.0.3 sympy @ file:///opt/concourse/worker/volumes/live/d5d0b33b-5c2f-493b-5b67-8149e5531868/volume/sympy_1605119535834/work TA-Lib @ file:///Users/runner/miniforge3/conda-bld/ta-lib_1637267171359/work tables==3.6.1 tabula==1.0.5 tabula-py==2.6.0 tabulate==0.9.0 tblib @ file:///tmp/build/80754af9/tblib_1597928476713/work tenacity==8.0.1 tensorboard==2.10.0 tensorboard-data-server==0.6.1 tensorboard-plugin-wit==1.8.1 tensorflow==2.10.0 tensorflow-estimator==2.10.0 tensorflow-io-gcs-filesystem==0.27.0 termcolor==2.0.1 terminado==0.9.1 testpath==0.4.4 texttable==1.6.7 thinc==8.1.9 threadpoolctl @ file:///tmp/tmp9twdgx9k/threadpoolctl-2.1.0-py3-none-any.whl tifffile==2020.10.1 tinycss2==1.2.1 tobler==0.9.0 toml @ file:///tmp/build/80754af9/toml_1592853716807/work toolz @ file:///tmp/build/80754af9/toolz_1601054250827/work torch==1.13.1 torchaudio==0.13.1 torchvision==0.14.1 tornado==6.3.1 torpy==1.1.6 tqdm @ file:///tmp/build/80754af9/tqdm_1602185206534/work traitlets==5.9.0 typer==0.7.0 typing_extensions==4.4.0 tzdata==2023.3 tzlocal==4.3 ujson @ file:///opt/concourse/worker/volumes/live/2fc9988c-ebca-4577-6c4b-7383ea76e8ee/volume/ujson_1602523306974/work umap-learn==0.5.3 unicodecsv==0.14.1 update-checker==0.18.0 urllib3 @ file:///tmp/build/80754af9/urllib3_1603305693037/work vaderSentiment==3.3.2 waitress==2.1.2 Wand==0.6.11 wasabi==1.1.1 watchdog @ file:///opt/concourse/worker/volumes/live/cc0ee7bb-1065-44c4-5867-0fd5d13729e0/volume/watchdog_1593447373245/work wcwidth @ file:///tmp/build/80754af9/wcwidth_1593447189090/work webencodings==0.5.1 websocket-client==1.5.1 Werkzeug==2.3.4 wget==3.2 widgetsnbextension==3.5.1 wordcloud==1.8.2.2 wrapt==1.11.2 WTForms==3.0.1 wurlitzer @ file:///opt/concourse/worker/volumes/live/01a17f3d-eafe-4806-57a1-4b9ef5d1815f/volume/wurlitzer_1594753845129/work xgboost==1.6.1 xlrd==1.2.0 XlsxWriter @ file:///tmp/build/80754af9/xlsxwriter_1602692860603/work xlwings==0.20.8 xlwt==1.3.0 xmltodict==0.12.0 xyzservices==2022.6.0 yapf @ file:///tmp/build/80754af9/yapf_1593528177422/work yfinance==0.2.17 zict==2.0.0 zipline-reloaded==2.4 zipp @ file:///tmp/build/80754af9/zipp_1604001098328/work zope.event==4.5.0 zope.interface @ file:///opt/concourse/worker/volumes/live/de428e3b-00ba-4161-442e-b9e5d25e4219/volume/zope.interface_1602002489816/work

Now that you know a little about me, let me tell you about the issue I am having:

Description of Issue

After I enter $ zipline ingest -b quandl in bash, it give me this error:

MacbookdeMacBook-Pro-3:Algo_Trading_ML macbook$ zipline ingest -b quandl Traceback (most recent call last): File "/opt/anaconda3/bin/zipline", line 8, in sys.exit(main()) File "/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 1130, in call return self.main(args, kwargs) File "/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, ctx.params) File "/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 760, in invoke return __callback(args, kwargs) File "/opt/anaconda3/lib/python3.8/site-packages/zipline/main.py", line 397, in ingest bundles_module.ingest( File "/opt/anaconda3/lib/python3.8/site-packages/zipline/data/bundles/core.py", line 424, in ingest asset_db_writer = AssetDBWriter(assets_db_path) File "/opt/anaconda3/lib/python3.8/site-packages/zipline/assets/asset_writer.py", line 3, in init # File "/opt/anaconda3/lib/python3.8/site-packages/zipline/utils/input_validation.py", line 811, in preprocessor return to(arg, to_kwargs) File "/opt/anaconda3/lib/python3.8/site-packages/zipline/utils/sqlite_utils.py", line 45, in check_and_create_engine return sa.create_engine("sqlite:///" + path, future=False) File "", line 2, in create_engine File "/opt/anaconda3/lib/python3.8/site-packages/sqlalchemy/util/deprecations.py", line 281, in warned return fn(*args, **kwargs) # type: ignore[no-any-return] File "/opt/anaconda3/lib/python3.8/site-packages/sqlalchemy/engine/create.py", line 662, in create_engine raise exc.ArgumentError( sqlalchemy.exc.ArgumentError: The 'future' parameter passed to create_engine() may only be set to True.

What steps have you taken to resolve this already?

I have already update SQLAlchemy, numexpr and pandas

I could not find same error like this in the website, please help me! Thank you very much!

Sincerely, Birdy

RichardDale commented 2 days ago

The really bad news: Your Zipline issue is unlikely to be looked at by anyone.

The bad news: Unfortunately since Quantopian closed, the original Zipline stopped development. This repository is no longer active.

The good news: Zipline was released as open source.

The really great news: A fork of Zipline called Zipline Reloaded is under active development by Stefan Jansen and several other amazing contributors: https://github.com/stefan-jansen/zipline-reloaded