FED: error in API
Reported by e-mail by Lorenzo N.
- https://db.nomics.world/FED/H15?dimensions=%7B%22MATURITY%22%3A%5B%22M3%22%5D%7D
- https://api.db.nomics.world/v22/series/FED/H15?limit=10&offset=0&observations=1&align_periods=1&facets=1&dimensions=%7B%22MATURITY%22%3A%5B%22M3%22%5D%7D
ERROR:flask.app:Exception on /series/FED/H15 [GET]
Traceback (most recent call last):
File "/home/cepremap/virtualenvs/dbnomics-api-v22/lib/python3.5/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/home/cepremap/virtualenvs/dbnomics-api-v22/lib/python3.5/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/cepremap/virtualenvs/dbnomics-api-v22/lib/python3.5/site-packages/flask_cors/extension.py", line 161, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/home/cepremap/virtualenvs/dbnomics-api-v22/lib/python3.5/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/cepremap/virtualenvs/dbnomics-api-v22/lib/python3.5/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/home/cepremap/virtualenvs/dbnomics-api-v22/lib/python3.5/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/home/cepremap/virtualenvs/dbnomics-api-v22/lib/python3.5/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/cepremap/virtualenvs/dbnomics-api-v22/lib/python3.5/site-packages/flasgger/utils.py", line 248, in wrapper
return function(*args, **kwargs)
File "/home/cepremap/dbnomics-api-v22/dbnomics-api/dbnomics_api/route_handlers.py", line 389, in series_of_dataset
series_list = complete_series_list(series_list, args["align_periods"], args["complete_missing_periods"])
File "/home/cepremap/dbnomics-api-v22/dbnomics-api/dbnomics_api/json_responses.py", line 240, in complete_series_list
], frequency=frequency, align_periods=align_periods, complete_missing_periods=complete_missing_periods)
File "/home/cepremap/virtualenvs/dbnomics-api-v22/lib/python3.5/site-packages/dbnomics_data_model/observations.py", line 192, in complete_series_list
for periods_dates, values in periods_dates_and_values_list
File "/home/cepremap/virtualenvs/dbnomics-api-v22/lib/python3.5/site-packages/dbnomics_data_model/observations.py", line 192, in <listcomp>
for periods_dates, values in periods_dates_and_values_list
File "/home/cepremap/virtualenvs/dbnomics-api-v22/lib/python3.5/site-packages/dbnomics_data_model/observations.py", line 149, in complete_series
min_date=min(all_periods_dates) if all_periods_dates is not None else periods_dates[0],
TypeError: unorderable types: NoneType() < datetime.date()
[pid: 12364|app: 0|req: 46862/91066] 163.172.179.200 () {40 vars in 734 bytes} [Tue Apr 9 16:28:26 2019] GET /v22/series/FED/H15?limit=10&offset=0&observation
s=1&align_periods=1&facets=1&dimensions=%7B%22MATURITY%22%3A%5B%22M3%22%5D%7D => generated 64 bytes in 164 msecs (HTTP/1.1 500) 3 headers in 122 bytes (1 switc
hes on core 1)
Edited by Christophe Benz