yutiansut / QUANTAXIS

QUANTAXIS 支持任务调度 分布式部署的 股票/期货/期权 数据/回测/模拟/交易/可视化/多账户 纯本地量化解决方案
https://yutiansut.github.io/QUANTAXIS/
MIT License
8.18k stars 2.96k forks source link

获取数据接口error AttributeError: __enter__ #1545

Open john012343210 opened 4 years ago

john012343210 commented 4 years ago

问题反馈

您使用的QUANTAXIS版本号是什么?

'1.9.24'

系统?

win10 python 3.7.6

问题?

很多获取数据的接口发生这个问题



~\AppData\Roaming\Python\Python37\site-packages\QUANTAXIS\QAFetch\QATdx.py in QA_fetch_get_extensionmarket_list(ip, port)
   1417     ip, port = get_extensionmarket_ip(ip, port)
   1418     apix = TdxExHq_API()
-> 1419     with apix.connect(ip, port):
   1420         num = apix.get_instrument_count()
   1421         return pd.concat([apix.to_df(

AttributeError: __enter__
yutiansut commented 4 years ago

网络不好 重试即可

liwendong66 commented 3 years ago

股票数据获取正常,期货获取不到数据啊

QA.QAFetch.QATdx.QA_fetch_get_future_min('RB1905','2019-01-01','2019-01-30', '5min') Traceback (most recent call last): File "", line 1, in File "/Users/hulongfei/PycharmPro/QUANTAXIS/QUANTAXIS/QAFetch/QATdx.py", line 2422, in QA_fetch_get_future_min ) if extension_market_list is None else extension_market_list File "/Users/hulongfei/PycharmPro/QUANTAXIS/QUANTAXIS/QAFetch/QATdx.py", line 1427, in QA_fetch_get_extensionmarket_list with apix.connect(ip, port): AttributeError: enter

yutiansut commented 3 years ago

@liwendong66 1905已经退市 本来也获取不到