Closed julius-datajunkie closed 3 years ago
If you define BBG_ROOT
in your path, xbbg
will cache each call to a cached file. By default cache=True
- it means xbbg
loads cached file if available.
If you use cache=False
, it will reload data from Bloomberg and save / override to your locally cached file.
Hi Alpha-xone,
Thanks for the prompt reply. I have retried to set the BBG_ROOT
variable per your suggestion.
import os
os.environ["BBG_ROOT"] = r"C:\Users\abc\bbg_data"
then I ran my code as:
blp.bdh(["XU1 Index", "XU2 Index"], ["PX_LAST"], start_date="2020-01-15")
But I see no files been generated under the folder as set for BBG_ROOT
. Morever, when I tried to run the following:
blp.bdib("ESA Index", dt="2020-01-25", session="allday", ref="CME")
It returns the error: OperationalError: unable to open database file
.
Not familiar with this error. But you need to assign BBG_ROOT
in the system, not in the console.
Hi. For some reason, I'm also unable to get blp.bdib
working.
For example, (Windows user here) I defined properly the BBG_ROOT
environment variable, and amended assets.yml
and exch.yml
to be able to pull Euronext commodities futures series. blp.bdh
and blp.bdtick
work perfectly well, but blp.bdib
returns me OperationalError: unable to open database file
whatever the kwargs I may try out.
The example provided in XBBG documentation blp.bdib(ticker='BHP AU Equity', dt='2018-10-17').tail()
gets me the same error message.
I'll continue to dig as I need those data (!), but any help is much welcome indeed!
Many thanks. tag
Hi. For some reason, I'm also unable to get
blp.bdib
working.For example, (Windows user here) I defined properly the
BBG_ROOT
environment variable, and amendedassets.yml
andexch.yml
to be able to pull Euronext commodities futures series.blp.bdh
andblp.bdtick
work perfectly well, butblp.bdib
returns meOperationalError: unable to open database file
whatever the kwargs I may try out.The example provided in XBBG documentation
blp.bdib(ticker='BHP AU Equity', dt='2018-10-17').tail()
gets me the same error message.I'll continue to dig as I need those data (!), but any help is much welcome indeed!
Many thanks. tag
Ok, so I got it working. It was a simple sqlite3 connection issue, more specifically with the command with db.SQLite(f'{data_path}/Logs/xbbg.db') as con:
in \xbbg\core\trials.py
The thing is that I hadn't any Logs
folder. So I manually created one, \xbbg\markets\Logs
(location depending on BBG_ROOT
).
The code examples in my previous post now work just fine.
Maybe @shadow-of-life-bravo can see whether this would also solve his issue?
Thank you. tag
Thanks for the info. It is fixed in version 0.7.6a8
.
Hi, I am trying to understand when I make repeated calls like this:
vs
Does it cache the result of these calls? Does the cache argument doing anything?
Thanks!