matthewgilbert / pdblp

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

Increasing BCon.timeout attribute for Historical Index Composition #34

Closed ahmasoh1992 closed 6 years ago

ahmasoh1992 commented 6 years ago

Hey!

Great work on the API - using it lots and it's doing a jolly good job.

I'm running into an issue where when I use the following:

X = con.ref('RAY Index','INDX_MWEIGHT_HIST', [('END_DT','19991231'),])

I end up facing the error:

raise RuntimeError("Timeout, increase BCon.timeout attribute")
RuntimeError: Timeout, increase BCon.timeout attribute

How can I manually hack the override in relation to this function call?

matthewgilbert commented 6 years ago

As of 2f8c3c82c743ac0c479fb3a914315242c066bcd2 you can set this in the constructor. Something like

import pdblp
con = pdblp.Bcon(timeout=5000)
matthewgilbert commented 6 years ago

This is available for version >= 0.1.3 on pypi as well.