Commit a4ba185c authored by Bruno Duyé's avatar Bruno Duyé

Fix #597 - convert errors: Non supported period notation: 'Y'

parent de923697
......@@ -244,6 +244,9 @@ def iter_series(table_filepath):
# Quarterly
quarter_id = parse_roman_quarters(observation_dict["T3_Periodo"])
return "{}-Q{}".format(observation_dict["Anyo"], quarter_id)
elif observation_dict["T3_Periodo"] == "Y":
# Yearly
return "{}".format(observation_dict["Anyo"])
else:
raise Exception("Non supported period notation: {!r}".format(observation_dict["T3_Periodo"]))
......@@ -290,6 +293,7 @@ def iter_series(table_filepath):
with table_filepath.open('rb') as table_file:
table_json = json.load(table_file)
for series_json in table_json:
log.debug("series {!r}".format(series_json['COD']))
dimensions_values, dimensions_labels = get_dimensions_values_and_labels(series_json)
yield {
'name': series_json["Nombre"].strip(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment