diff --git a/csv_metadata_quality/fix.py b/csv_metadata_quality/fix.py index 00aa6e7..8cca992 100755 --- a/csv_metadata_quality/fix.py +++ b/csv_metadata_quality/fix.py @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-3.0-only +import logging import re from unicodedata import normalize @@ -313,6 +314,10 @@ def countries_match_regions(row): # because we don't need to re-load the country data with each iteration. cc = coco.CountryConverter() + # Set logging to ERROR so country_converter's convert() doesn't print the + # "not found in regex" warning message to the screen. + logging.basicConfig(level=logging.ERROR) + # Iterate over the labels of the current row's values to get the names of # the title and citation columns. Then we check if the title is present in # the citation.