Blpapi 'ignore_security_error=1' 是一个意外的关键字
Blpapi 'ignore_security_error=1' is an unexpected keyword
在将 ignore_security_error=1 与 Blpapi 一起使用时,我得到 "ref() got an unexpected keyword argument 'ignore_security_error'"。我的列表中有一些错误代码,我想使用 ignore_security_error=1 忽略但出现错误。 tc3 是从 .csv 文件生成的代码列表。
M2= con.ref(tc3,["PX_LAST","CONTRACT_VALUE","CHG_PCT_1YR","CHG_PCT_6M","CHG_PCT_3M","CHG_PCT_1M","FO211","MARKET_SECTOR_DES","ID_BB_COMPANY"],ignore_security_error=1)
还有其他人遇到这个问题吗?
看起来它正在请求覆盖的元组列表。尝试像
一样传递它
M2= con.ref(tc3,["PX_LAST","CONTRACT_VALUE","CHG_PCT_1YR","CHG_PCT_6M","CHG_PCT_3M","CHG_PCT_1M","FO211","MARKET_SECTOR_DES","ID_BB_COMPANY"],[('ignore_security_error', 1)])
见https://github.com/matthewgilbert/pdblp/blob/master/pdblp/pdblp.py#L322
注意可能取True而不是1。如果此代码不起作用,请尝试替换它。
In [1]: from xbbg import blp
In [2]: tc3 = ...
In [3]: flds = [...]
In [4]: m2 = blp.bdp(tickers=tc3, flds=flds).dropna(how='all')
参考:xbbg
在将 ignore_security_error=1 与 Blpapi 一起使用时,我得到 "ref() got an unexpected keyword argument 'ignore_security_error'"。我的列表中有一些错误代码,我想使用 ignore_security_error=1 忽略但出现错误。 tc3 是从 .csv 文件生成的代码列表。
M2= con.ref(tc3,["PX_LAST","CONTRACT_VALUE","CHG_PCT_1YR","CHG_PCT_6M","CHG_PCT_3M","CHG_PCT_1M","FO211","MARKET_SECTOR_DES","ID_BB_COMPANY"],ignore_security_error=1)
还有其他人遇到这个问题吗?
看起来它正在请求覆盖的元组列表。尝试像
一样传递它 M2= con.ref(tc3,["PX_LAST","CONTRACT_VALUE","CHG_PCT_1YR","CHG_PCT_6M","CHG_PCT_3M","CHG_PCT_1M","FO211","MARKET_SECTOR_DES","ID_BB_COMPANY"],[('ignore_security_error', 1)])
见https://github.com/matthewgilbert/pdblp/blob/master/pdblp/pdblp.py#L322
注意可能取True而不是1。如果此代码不起作用,请尝试替换它。
In [1]: from xbbg import blp
In [2]: tc3 = ...
In [3]: flds = [...]
In [4]: m2 = blp.bdp(tickers=tc3, flds=flds).dropna(how='all')
参考:xbbg