Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Period error for Semiannual data #18

Open
wochner opened this issue Jan 18, 2017 · 2 comments
Open

Period error for Semiannual data #18

wochner opened this issue Jan 18, 2017 · 2 comments

Comments

@wochner
Copy link

wochner commented Jan 18, 2017

I think the period specification for semiannual data should be 'SEMI_ANNUALLY'. 'SEMI-ANNUAL' gives me an error:

Traceback (most recent call last):
File "F:\source\Python\macro\macro_sheet_financial.py", line 64, in
non_trading_day_fill_option = 'ALL_CALENDAR_DAYS')
File "C:\Python27\lib\site-packages\tia\bbg\v3api.py", line 740, in get_historical
return self.execute(req)
File "C:\Python27\lib\site-packages\tia\bbg\v3api.py", line 716, in execute
asbbg = request.get_bbg_request(svc, session)
File "C:\Python27\lib\site-packages\tia\bbg\v3api.py", line 346, in get_bbg_request
request.set('periodicitySelection', self.period)
File "C:\Python27\lib\site-packages\blpapi\request.py", line 61, in set
self.asElement().setElement(name, value)
File "C:\Python27\lib\site-packages\blpapi\element.py", line 640, in setElement
traits[0](self.__handle, name[0], name[1], value))
File "C:\Python27\lib\site-packages\blpapi\exception.py", line 145, in raiseOnError
_ExceptionUtil.raiseException(errorCode, description)
File "C:\Python27\lib\site-packages\blpapi\exception.py", line 137, in raiseException
raise errorClass(description, errorCode)
NotFoundException: Constant with value 'SEMI-ANNUAL' does not exist. (0x0006000d)

@jason79
Copy link

jason79 commented Feb 4, 2017

I've tried "SEMI-ANNUALLY" ... but it doesn't work

File "C:\Python27\lib\site-packages\blpapi\exception.py", line 137, in raiseException
raise errorClass(description, errorCode)
NotFoundException: Constant with value 'SEMI-ANNUALLY' does not exist. (0x0006000d)

Where to look this up? I've also tried "HALF", "SEMI", "SEMIANNUALLY", "SEMIANNUAL", "HALF-YEAR", "BI-ANNUALLY"'

FOUND IT... it's "SEMI_ANNUALLY" ... underscore, not hyphen, you have to update "v3api.py" also to "SEMI_ANNUALLY"

@wochner
Copy link
Author

wochner commented Feb 5, 2017 via email

bpsmith added a commit that referenced this issue Jun 5, 2017
Corrected SEMI_ANNUALLY in both bbg/bbg_com.py and v3api.py issue #18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants