albertvillanova / WikidataBot

Wikidata bot
http://www.wikidata.org/wiki/User:AVMbot
0 stars 0 forks source link

[scripts] Add population error: 'NoneType' object has no attribute 'year' #51

Closed albertvillanova closed 3 years ago

albertvillanova commented 3 years ago
2021-03-07 20:57:23,551 [    INFO] Item: Charente (Q3266) with INSEE code 16
Traceback (most recent call last):
  File "./scripts/add_population.py", line 594, in <module>
    params=params
  File "./scripts/add_population.py", line 426, in main
    is_duplicated = check_duplicated_year(administrative_division, population_statement._statement)
  File "./scripts/add_population.py", line 323, in check_duplicated_year
    statement_point_in_time_qualifier_year = statement.qualifiers[point_in_time][0].getTarget().year
AttributeError: 'NoneType' object has no attribute 'year'
CRITICAL: Exiting due to uncaught exception <class 'AttributeError'>
albertvillanova commented 3 years ago

Point in time had 'unknown value'.