is range_specifier working in get_fundamentals in research? See below.
any time I set range_specifier larger than 1 I get this error. What am I doing wrong?
import datetime
today = datetime.datetime.now().strftime('%Y-%m-%d')
today
fundamentals = init_fundamentals()
fund_df = get_fundamentals(query(fundamentals.valuation_ratios.pe_ratio)
.filter(fundamentals.valuation.market_cap > 10e9)
.filter(fundamentals.valuation_ratios.pe_ratio > 5)
.order_by(fundamentals.valuation.market_cap)
.limit(500),
today, '5y')
fund_df
HTTPError Traceback (most recent call last)
in ()
10 .order_by(fundamentals.valuation.market_cap)
11 .limit(500),
---> 12 today, '5y')
13
14 # OK, let's check out what we get back.
/build/src/qexec_repo/qexec/research/api.py in get_fundamentals(query, base_date, range_specifier, filter_ordered_nulls)
103 base_date,
104 range_specifier,
--> 105 filter_ordered_nulls,
106 )
107
/build/src/qexec_repo/qexec/research/api.py in get_fundamentals_with_namespace(ns, available_date_tbl, query, base_date, range_specifier, filter_ordered_nulls)
125 filter_ordered_nulls,
126 )
--> 127 return client.get_fundamentals(query_dict)
128
129
/build/src/qexec_repo/qexec/research/web/client.pyc in get_fundamentals(self, query_dict)
291 query_dict['columns'],
292 query_dict['dates'],
--> 293 query_dict['return_panel'],
294 )
295
/build/src/qexec_repo/qexec/research/web/helpers.pyc in method(args, **kwargs)
128 def _method(*args, **kwargs):
129 response = f(args, **kwargs)
--> 130 response.raisefor_status()
131
132 # If we make it to here, that means we have a 200. It still might
/usr/local/lib/python2.7/dist-packages/requests/models.pyc in raise_for_status(self)
838
839 if http_error_msg:
--> 840 raise HTTPError(http_error_msg, response=self)
841
842 def close(self):
HTTPError: 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:8080/api/fundamentals