Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlockStock记录新浪板块资金流入出错 #45

Closed
manstiilin opened this issue Jan 22, 2020 · 1 comment
Closed

BlockStock记录新浪板块资金流入出错 #45

manstiilin opened this issue Jan 22, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@manstiilin
Copy link
Contributor

In [2]: BlockMoneyFlow.record_data(codes=['gn_jght'])
BlockMoneyFlow registered recorders:{'sina': <class 'zvt.recorders.sina.money_flow.sina_block_money_flow_recorder.SinaBlockMoneyFlowRecorder'>}
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-2-3b3704d6ea6e> in <module>
----> 1 BlockMoneyFlow.record_data(codes=['gn_jght'])

~/workspace/github/zvtvz/zvt/zvdata/__init__.py in record_data(cls, provider_index, provider, exchanges, entity_ids, codes, batch_size, force_update, sleeping_time, default_size, real_time, fix_duplicate_way, start_timestamp, end_timestamp, close_hour, close_minute)
    232                 # 2)the table of schema with IntervalLevel format is {entity}_{level}_{event}
    233                 table: str = cls.__tablename__
--> 234                 level = IntervalLevel(table.split('_')[1])
    235                 r = recorder_class(exchanges=exchanges, entity_ids=entity_ids, codes=codes, batch_size=batch_size,
    236                                    force_update=force_update, sleeping_time=sleeping_time, default_size=default_size,

~/workspace/github/zvtvz/zvt/ve/lib/python3.6/enum.py in __call__(cls, value, names, module, qualname, type, start)
    289         """
    290         if names is None:  # simple value lookup
--> 291             return cls.__new__(cls, value)
    292         # otherwise, functional API: we're creating a new Enum type
    293         return cls._create_(value, names, module=module, qualname=qualname, type=type, start=start)

~/workspace/github/zvtvz/zvt/ve/lib/python3.6/enum.py in __new__(cls, value)
    531                     return member
    532         # still not found -- try _missing_ hook
--> 533         return cls._missing_(value)
    534
    535     def _generate_next_value_(name, start, count, last_values):

~/workspace/github/zvtvz/zvt/ve/lib/python3.6/enum.py in _missing_(cls, value)
    544     @classmethod
    545     def _missing_(cls, value):
--> 546         raise ValueError("%r is not a valid %s" % (value, cls.__name__))
    547
    548     def __repr__(self):

ValueError: 'money' is not a valid IntervalLevel

直接使用SinaBlockMoneyFlowRecorder可以,应该是代理的构造函数的问题

@foolcage foolcage added the bug Something isn't working label Jan 23, 2020
@foolcage
Copy link
Member

最新版本已修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants