掘金社区

Linux python SDK OSErrorPinned highlighted

zevaglex 发表在问题反馈 2018-05-26 12:53:43

问题反馈
457
4
0

File "/usr/local/anaconda3/lib/python3.6/site-packages/gm/model/fundamental.py", line 290, in get_history_constituents
self._init_addr()
File "/usr/local/anaconda3/lib/python3.6/site-packages/gm/model/fundamental.py", line 56, in _init_addr
raise EnvironmentError
OSError

评论: 4
  • 目前linux环境下使用sdk需要指定终端服务地址。

    执行策略:run函数指定serv_addr

    数据查询: 在设置token前调用set_serv_addr函数

    2018-05-28 10:02:33
  • @你说我容易嘛 在调用set_serv_addr之后报另外的错误了:
    [libprotobuf FATAL /home/aekin/gm3/gmsdk-3/gmsdk-c/gmsdk-c/../../../thirdlib-sdk/protobuf-3.4.0/src/google/protobuf/map.h:1038] CHECK failed: it != end():
    terminate called after throwing an instance of 'google::protobuf::FatalException'
    what(): CHECK failed: it != end():

    2018-06-02 14:10:02
  • 看上去是py_gmi_get_serv_addr这个函数报的错

    2018-06-02 14:29:35
  • coding=utf8

    from gm.api import *

    set_token('XXXXXXX')
    set_serv_addr("192.168.0.190:7001")

    data = history_n(symbol="SHSE.600000", frequency="tick", count=5, df=True)
    print (data)

    大概这个格式 addr 是你终端地址的ip + 端口号(信息在用户目录下 .gmserv.toml文件 e.g: C:\Users\cc.goldminer )

    2018-06-11 16:31:31

Looks like your connection to 掘金量化社区 - 量化交易者的策略交流学习社区 was lost, please wait while we try to reconnect.