matthewgilbert / pdblp

pandas wrapper for Bloomberg Open API
MIT License
241 stars 67 forks source link

TypeError: string indices must be integers #73

Closed arbitrager44 closed 4 years ago

arbitrager44 commented 4 years ago

I only recently started working with this package, and am excited about the prospects for it. However all of a sudden I can't seem to get even the simplest connection to work.

import pdblp
import pandas as pd

con = pdblp.BCon(debug=False, port=8194, timeout=5000)
con.start()

con.bulkref('BCOM Index', 'INDX_MWEIGHT')

Results:

Traceback (most recent call last): File "bquant_test.py", line 8, in con.bulkref('BCOM Index', 'INDX_MWEIGHT') File "C:\Users\arbit\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pdblp\pdblp.py", line 466, in bulkref data = self._parse_bulkref(flds) File "C:\Users\arbit\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pdblp\pdblp.py", line 481, in _parse_bulkref secData = security_data_dict['securityData'] TypeError: string indices must be integers

matthewgilbert commented 4 years ago

When trying to debug things you should set debug=True and include the data in your issue.

arbitrager44 commented 4 years ago

So I figured out the problem. Somehow a version conflict came up between the C++ API and the Python API. I don't know why it was working at one point and suddenly not working, but that was it. Once I installed 3.13 of the C++ API, everything worked fine.