xingetouzi / rqalpha-mod-fxdayu-source

rqalpha拓展数据和事件源,支持分钟级别回测,实时交易,支持quantos数据源
94 stars 51 forks source link

单独使用QuantOsSource data_source以及data_proxy的history_bar方法获取日或者分钟数据时,报错 #6

Closed walkacross closed 6 years ago

walkacross commented 6 years ago

hi,thanks for sharing this nice project. 在使用过程中,遇到如下问题:

单独使用QuantOsSource data_source以及data_proxy的history_bar获取日或者分钟数据时,报错RuntimeError: 0,Cannot deserialize instance of java.lang.String out of START_ARRAY token at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: com.junzhiam.cloud.gateway.SessionActor$LoginReq["username"])

环境

ubuntu 16.04 python3.6

code

`import datetime from rqalpha.data.data_proxy import DataProxy from rqalpha_mod_fxdayu_source.data_source.quantos import QuantOsSource

rqalpha_data_path = "xxxx" api_url = "tcp://data.quantos.org:8910" quantos_user = "xxxx" quantos_token = "xxxx"

data_source = QuantOsSource(rqalpha_data_path, api_url=api_url, user=quantos_user, token=quantos_token)

data_proxy = DataProxy(data_source) end_dt = datetime.datetime(2018,7,24,10,54,00) output = data_proxy.history_bars('000001.XSHE',bar_count = 10,frequency='5m',dt=end_dt,field=['open','close']) `

可否查看一下原因? thanks for your time

BurdenBear commented 6 years ago

你好,未能复现错误,看错误内容应该是quantos数据服务Server端的内部出现了问题,你可以看到打印的是JAVA程序的堆栈。应该只是临时性的(我本地测试的时候没有遇到报错)。建议检查一下用户名和token是否填写正确

附:

image

walkacross commented 6 years ago

确实是quantos那边的问题,会关闭issue,谢谢你的反馈,have a good day.