matthewgilbert / pdblp

pandas wrapper for Bloomberg Open API
MIT License
240 stars 69 forks source link

'GSERFCI INDEX' cause problem #92

Open lastrocer opened 3 years ago

lastrocer commented 3 years ago

I can replace 'GSERFCI INDEX' with 'not a ticker' the program run fine but if I use 'GSERFCI INDEX'. code doesn't run poperly. no df_out and problem_tickers='index' . There are several "name" cause the problem this is one of them.

Can you help? thank you.

con = pdblp.BCon() con.start() tickers = [['C US Equity','SPY US Equity','IBM US Equity', 'S5INSS INDEX', 'GSERFCI INDEX']] df_out = pd.DataFrame() L = [] for i in tickers: try: df = con.ref(i, ["PX_LAST"]) df_out = df_out.append(df) except Exception as e: problem_ticker = e.args[0].split()[-1] L.append(problem_ticker) problem_tickers = pd.DataFrame(L, columns=['TICKER'])

matthewgilbert commented 3 years ago

You probably want to set con.debug = True and look at the output for indications of the possible issue.