alpha-xone / xbbg

An intuitive Bloomberg API
https://xbbg.readthedocs.io/
Apache License 2.0
246 stars 52 forks source link

KeyError: 'Cannot find exchange info ...' while using blp.bdib #32

Closed girishmithran closed 3 years ago

girishmithran commented 3 years ago

I am getting an error while trying to retrieve intra-day data as below: I have set BBG_ROOT in my user environment to point to the folder with the /markets folder containing the yaml files. xbbg version is 0.7.5

blp.bdib(ticker='ES1 Index', dt='2021-02-19').tail()

2021-02-21 20:47:26,647:xbbg.const.exch_info:ERROR:required info (allday + tz) cannot be found in ES1 Index ...
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-36-48f07c9cf297> in <module>
----> 1 blp.bdib(ticker='ES1 Index', dt='2021-02-19').tail()

~\miniconda3\envs\py3.8\lib\site-packages\xbbg\blp.py in bdib(ticker, dt, session, typ, **kwargs)
    217     ex_info = const.exch_info(ticker=ticker, **kwargs)
    218     if ex_info.empty:
--> 219         raise KeyError(f'Cannot find exchange info for {ticker}')
    220 
    221     ss_rng = process.time_range(

KeyError: 'Cannot find exchange info for ES1 Index'
alpha-xone commented 3 years ago

Can you remove all yaml files created by yourself and try again? I cannot replicate your error unfortunately

girishmithran commented 3 years ago

Hi. This didn't work. I also tried in virtual env with older versions of the package (0.7.2 and 0.6.6) and got the same error.

alpha-xone commented 3 years ago

this works in auto-ci and my environments (production and virtual). not sure what exactly happened on your end. issues are not meant to help you debugging. if no one else has the same issue and no one offers help within a certain time, will close this issue.

girishmithran commented 3 years ago

thank you for checking. will post here if I find a solution.

girishmithran commented 3 years ago

this got fixed when I installed the latest version 0.7.6a3 from github. Thank you

alpha-xone commented 3 years ago

This is great