quantopian / zipline

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

TypeError: an integer is required (got type bytes) #2838

Closed taeyurl closed 2 years ago

taeyurl commented 2 years ago

Dear Zipline Maintainers,

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

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

Description of Issue

Here is how you can reproduce this issue on your machine:

Traceback (most recent call last): File "zipline/data/bundles/alpaca_api.py", line 12, in import zipline.config File "c:\users\mpower\zipline-trader\zipline__init.py", line 30, in from .utils.run_algo import run_algorithm File "c:\users\mpower\zipline-trader\zipline\utils\run_algo.py", line 24, in from zipline.data import bundles File "c:\users\mpower\zipline-trader\zipline\data\bundles__init.py", line 2, in from . import quandl # noqa File "c:\users\mpower\zipline-trader\zipline\data\bundles\quandl.py", line 16, in from . import core as bundles File "c:\users\mpower\zipline-trader\zipline\data\bundles\core.py", line 13, in from ..adjustments import SQLiteAdjustmentReader, SQLiteAdjustmentWriter File "c:\users\mpower\zipline-trader\zipline\data\adjustments.py", line 29, in from ._adjustments import load_adjustments_from_sqlite File "zipline\data_adjustments.pyx", line 35, in init zipline.data._adjustments from zipline.assets.asset_writer import ( File "c:\users\mpower\zipline-trader\zipline\assets\init__.py", line 22, in from .assets import ( File "c:\users\mpower\zipline-trader\zipline\assets\assets.py", line 67, in from .asset_writer import ( File "c:\users\mpower\zipline-trader\zipline\assets\asset_writer.py", line 453, in class AssetDBWriter(object): File "c:\users\mpower\zipline-trader\zipline\assets\asset_writer.py", line 464, in AssetDBWriter def init__(self, engine, asset_finder=None): File "c:\users\mpower\zipline-trader\zipline\utils\preprocess.py", line 109, in _decorator return _build_preprocessed_function( File "c:\users\mpower\zipline-trader\zipline\utils\preprocess.py", line 247, in _build_preprocessed_function new_func.code = CodeType(*map(getitem(args), _code_argorder)) TypeError: an integer is required (got type bytes)

Sincerely, Paul

andycwang commented 2 years ago

@.***邮箱联系我,谢谢!

taeyurl commented 2 years ago

Just used 3.7.5..