question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

raise ConnectionError("Could not start a blpapi.session")

See original GitHub issue

I have installed pdblp pip install -e pdblp I am on Ubuntu 16.04 My code

import pdblp
con = pdblp.BCon(debug=True, port=8194)
con.start()
con.bdh('SPY US Equity', 'PX_LAST','20150629', '20150630')

I got

python t15.py

08JAN2018_11:28:53.155 12856:140190920144640 WARN blpapi_platformtransporttcp.cpp:137 blpapi.session.transporttcp.{1}.localhost:8194 127.0.0.1:8194, session pool state=Failed

08JAN2018_11:28:53.155 12856:140190920144640 WARN blpapi_platformcontroller.cpp:508 blpapi.session.platformcontroller.{1} Platform failed 1 consecutive connect attempts, stopped trying to reconnect. { PlatformId=0 }
INFO:root:Failed to start session. Traceback (most recent call last): File “t15.py”, line 4, in <module> con.start() File “/home/milenko/pdblp/pdblp/pdblp.py”, line 81, in start raise ConnectionError(“Could not start a blpapi.session”) ConnectionError: Could not start a blpapi.session

Why?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
matthewgilbertcommented, Jan 8, 2018

This library is a wrapper on top of the python bloomberg API, blpapi which handles the communication with the Bloomberg Service. This error is telling you that you cannot connect to the Bloomberg Service. You will need to make sure you are running a Bloomberg Professional Terminal on the machine you are attempting to connect from. This should also work with B-PIPE although I have not tested this.

0reactions
MilenkoMarkoviccommented, Jan 8, 2018

ok,thanks.

On 8 January 2018 at 19:14, Matthew Gilbert notifications@github.com wrote:

I would take a look at pandas-datareder https://github.com/pydata/pandas-datareader which has some functionality around interfacing with free data sources.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/matthewgilbert/pdblp/issues/21#issuecomment-356047920, or mute the thread https://github.com/notifications/unsubscribe-auth/AM1x-L6AGYy--2goJAyLj2168AdOiQ25ks5tIlrqgaJpZM4RWLuN .

Read more comments on GitHub >

github_iconTop Results From Across the Web

bloomberg can't start session - Stack Overflow
I am using bloomberg API to fetch market data, this is example given with the API SDK package ...
Read more >
blpapi.Session — BLPAPI Python 3.13.1 documentation
A Session is synchronous if an eventHandler argument is not supplied when it is constructed. The nextEvent() method must be called to read...
Read more >
BLPAPI: Developer's Guide - Bloomberg Professional Services
... can provide conflated streaming data to improve the bandwidth usage and the latency of applications. ... System.out.println("Could not start session.");.
Read more >
How to connect Bloomberg's xbbp api to "Bloomberg Anywhere"
Due to COVID's remote work situation I found myself unable to access my physical terminal so I've had to use bloomberg anywhere (bba), ......
Read more >
Python fetch list - ProgramCreek.com
:param generic_ticker: str :return: list """ session = blpapi.Session() if not session.start(): raise ConnectionError("Failed to start session.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found