matthewgilbert / pdblp

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

blpapi.Event attribute throwing error #52

Closed lakeheck closed 5 years ago

lakeheck commented 5 years ago

I am running python 3.6 on windows and have successfully installed blpapi, but am getting the below when trying to import pdblp (importing blpapi works fine)

>>> import blpapi
>>> import pdblp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\pdblp\__init__.py", line 1, in <module>
    from .pdblp import BCon  # NOQA
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\pdblp\pdblp.py", line 8, in <module>
    _RESPONSE_TYPES = [blpapi.Event.RESPONSE, blpapi.Event.PARTIAL_RESPONSE]
AttributeError: module 'blpapi' has no attribute 'Event'

Version Information

pdblp 0.1.7

matthewgilbert commented 5 years ago

This is hard to diagnose as it is not reproducible by me. One guess is that you have another folder named blpapi somewhere on your path that is masking the properly installed blpapi library?

lakeheck commented 5 years ago

My workaround was to clone https://github.com/msitt/blpapi-python and run setup.py, then manually move the resulting blpapi and info folders into my python lib folder. Then just had to add the c++ sdk to path and it all worked fine