running a simple pdblp code to extract BBG data

540 views Asked by At

I am currently logged on to my BBG anywhere (web login) on my Mac. So first question is would I still be able to extract data using tia (as I am not actually on my terminal)

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

I got this error

pdblp.pdblp:WARNING:Message Received:
SessionStartupFailure = {
    reason = {
        source = "Session"
        category = "IO_ERROR"
        errorCode = 9
        description = "Connection failed"
    }
}
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/Users/prasadkamath/anaconda2/envs/Pk36/lib/python3.6/site-packages/pdblp/pdblp.py", line 147, in start
    raise ConnectionError('Could not start blpapi.Session')
ConnectionError: Could not start blpapi.Session

I am assuming that I need to be on the terminal to be able to extract data, but wanted to confirm that.

1

There are 1 answers

0
Pepino On

This is a duplicate of this issue here on SO. It is not an issue with pdblp per se, but with blpapi not finding a connection. You mention that you are logged in via the web, which only allows you to use the terminal (or Excel add-in) within the browser, but not outside of it, since this way of accessing Bloomberg lacks a data feed and an API. More details and alternatives can be found here.