Closed albertvillanova closed 4 years ago
wikipedia:ca:Aelfwald II de Northúmbria
2020-03-03 00:07:41,249 [ INFO] Parse position qualifier: final: ''c.'' 810
2020-03-03 00:07:41,249 [ INFO] Parse date
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
~\projects\wikidata\WikidataBot\scripts\transfer_infotable.py in <module>
1179 positions = extract_positions(infotable_params)
1180 logger.info(f"Positions: {positions}")
-> 1181 position_statements = create_position_statements(positions)
1182 if position_statements:
1183 # Get item
~\projects\wikidata\WikidataBot\scripts\transfer_infotable.py in create_position_statements(positions)
939 # Parse each position
940 for position in positions:
--> 941 position_claim, qualifiers = parse_position(position)
942 if not position_claim:
943 # 1. Create the maximum number of statements
~\projects\wikidata\WikidataBot\scripts\transfer_infotable.py in parse_position(position)
891 # rest
892 elif position_key in INFOTABLE_PARAMS:
--> 893 qualifier_claim = parse_position_qualifier(position_key, position_value)
894 else:
895 logger.error(f"Unknown position qualifier key, value: {position_key}; {position_value}")
~\projects\wikidata\WikidataBot\scripts\transfer_infotable.py in parse_position_qualifier(key, value, position_value_id)
763 return 'CONTINUE'
764 # Date
--> 765 claim_value = parse_date(value)
766 elif key == 'predecessor' or key == 'successor':
767 if value == "-":
~\projects\wikidata\WikidataBot\scripts\transfer_infotable.py in parse_date(value)
558 logger.error(f"Failed parsing date: {value}")
559 return
--> 560 date_parts = [int(part) if part.isdigit() else TO_MONTH_NUMBER[part] for part in date_parts]
561 claim_value = {k: v for k, v in zip(['year', 'month', 'day'], date_parts)}
562 return claim_value
~\projects\wikidata\WikidataBot\scripts\transfer_infotable.py in <listcomp>(.0)
558 logger.error(f"Failed parsing date: {value}")
559 return
--> 560 date_parts = [int(part) if part.isdigit() else TO_MONTH_NUMBER[part] for part in date_parts]
561 claim_value = {k: v for k, v in zip(['year', 'month', 'day'], date_parts)}
562 return claim_value
KeyError: "''c.''"