diff --git a/arkindex/dataimport/filetypes.py b/arkindex/dataimport/filetypes.py index eaf39b86374d9a164bfaac7a5fcafaef9ff0941a..32b29ff4578ab3e3d9b1197b661fd53b766fceea 100644 --- a/arkindex/dataimport/filetypes.py +++ b/arkindex/dataimport/filetypes.py @@ -56,7 +56,7 @@ class FileType(ABC): self.changed_objects = [] def __str__(self): - return '{} - {}Â from {} to {}'.format( + return '{} - {} from {} to {}'.format( self.__class__.__name__, self.diff.type.name, self.diff.old_path, diff --git a/arkindex/dataimport/iiif.py b/arkindex/dataimport/iiif.py index 418b3e22c82cc1209400e987b6dfae836da91177..b7645015da55e156751b9e0fcf82e34d11c72342 100644 --- a/arkindex/dataimport/iiif.py +++ b/arkindex/dataimport/iiif.py @@ -438,7 +438,7 @@ class ManifestParser(IIIFParser): def run(self): try: self.parse() - logger.info("Parsed volume {}: {}Â metadata in volume, {} pages ({} changed), {}Â new servers".format( + logger.info("Parsed volume {}: {} metadata in volume, {} pages ({} changed), {} new servers".format( self.volume.name, len(self.metadata), len(self.pages), self.change_count, self.created_servers_count )) diff --git a/arkindex/documents/indexer.py b/arkindex/documents/indexer.py index 482453d74fd8ffbcb81a22b45c7737b33f4245ff..2d15a0e32ae27dc3c466a02ec1aa3f9d153c7400 100644 --- a/arkindex/documents/indexer.py +++ b/arkindex/documents/indexer.py @@ -82,7 +82,7 @@ class Indexer(object): self.elastic.indices.delete(index=index_name) logger.info("Dropped index {}".format(index_name)) except NotFoundError: - logger.info("Could not drop index {}Â (does not exist)".format(index_name)) + logger.info("Could not drop index {} (does not exist)".format(index_name)) def run_index(self, index_name, index_type, queryset, bulk_size=400): """ diff --git a/arkindex/documents/management/commands/delete_corpus.py b/arkindex/documents/management/commands/delete_corpus.py index c05450ff30ef84abc3328924f6060aac0ecaf33c..9f44728e322efacb65e741c698d4cf981607bcd0 100644 --- a/arkindex/documents/management/commands/delete_corpus.py +++ b/arkindex/documents/management/commands/delete_corpus.py @@ -87,7 +87,7 @@ class Command(PonosCommand): elts = Element.objects.filter(id__in=element_ids[i:i+batch_size]) deleted += elts.count() elts.delete() - logger.info('Deleted {} elements out of {}Â ({: >3}%)'.format( + logger.info('Deleted {} elements out of {} ({: >3}%)'.format( deleted, element_count, int(100.0 * deleted / element_count), diff --git a/arkindex/documents/surface.py b/arkindex/documents/surface.py index 459558d79ca68f3c88a4b09741adf9c1b97cd6e3..98492a96bc3ef4e36e17a7ad71a6da58575f356a 100644 --- a/arkindex/documents/surface.py +++ b/arkindex/documents/surface.py @@ -104,6 +104,6 @@ class SurfaceImporter(object): surfaces_count += region_count created_surfaces_count += created_count - logger.info("Parsed {}Â and created {}Â surfaces from {} XML files".format( + logger.info("Parsed {} and created {} surfaces from {} XML files".format( surfaces_count, created_surfaces_count, xml_count, )) diff --git a/arkindex/documents/surface_link.py b/arkindex/documents/surface_link.py index 341571c968c1ae1e12d1045a4143136d1b1cab5c..ba2fb99532d1883c479b6ea8bd7e773dd69e3970 100644 --- a/arkindex/documents/surface_link.py +++ b/arkindex/documents/surface_link.py @@ -242,7 +242,7 @@ class SurfaceLinker(object): # The only trustable folio is the act starting folio - we start by finding all pages between this act's # starting folio and the next act's starting folio. Conflicts will be solved later. for index, act in enumerate(self.acts_raw): - logger.debug('Parsing act {} of volume {}Â with folio "{}"'.format( + logger.debug('Parsing act {} of volume {} with folio "{}"'.format( act.number, self.volume.name, act.folio)) # First find this act's folios @@ -350,7 +350,7 @@ class SurfaceLinker(object): @transaction.atomic def save_act(self, act_raw): - logger.debug('Saving act {} of volume {}Â with folio "{}"'.format( + logger.debug('Saving act {} of volume {} with folio "{}"'.format( act_raw.number, self.volume.name, act_raw.folio)) # Get the act @@ -400,10 +400,10 @@ class SurfaceLinker(object): def print_stats(self, dry_run=False): logger.info('Ran in {}'.format(datetime.timedelta(seconds=self.end_time - self.start_time))) logger.info('Parsed {} acts'.format(self.parsed_acts)) - logger.info('Found {}Â surfaces'.format(self.surfaces_count)) - logger.info('{} {}Â surfaces to acts'.format(dry_run and 'Would link' or 'Linked', self.linked_surfaces)) + logger.info('Found {} surfaces'.format(self.surfaces_count)) + logger.info('{} {} surfaces to acts'.format(dry_run and 'Would link' or 'Linked', self.linked_surfaces)) if not dry_run: - logger.info('Created {}Â acts'.format(self.created_acts)) + logger.info('Created {} acts'.format(self.created_acts)) def _pop_surfaces(self, folio, index=None): """ @@ -413,12 +413,12 @@ class SurfaceLinker(object): Will log warnings if folio does not exist or has no surfaces available. """ if folio not in self.surfaces: - logger.warning('Folio {}Â not found in surfaces of volume {}'.format( + logger.warning('Folio {} not found in surfaces of volume {}'.format( folio, self.volume.name)) return [] if not self.surfaces[folio]: - logger.warning('Ran out of surfaces for folio {}Â of volume {}'.format( + logger.warning('Ran out of surfaces for folio {} of volume {}'.format( folio, self.volume.name)) return [] diff --git a/arkindex/images/importer.py b/arkindex/images/importer.py index bd62d088213d1c42eace210746576b874510d9ee..e0188479e7b886dc8f591266b9fd928ca2245b78 100644 --- a/arkindex/images/importer.py +++ b/arkindex/images/importer.py @@ -273,7 +273,7 @@ class IndexImporter(object): for path in self.path.glob('**/*.idx.gz'): rel_path = path.relative_to(self.path) if len(rel_path.parts) <= 1: # File is in root folder - logger.warning('File {}Â is not in a subfolder'.format(str(rel_path))) + logger.warning('File {} is not in a subfolder'.format(str(rel_path))) continue volume = self.find_volume(rel_path.parts[0]) if not volume: diff --git a/arkindex/images/management/commands/check_images.py b/arkindex/images/management/commands/check_images.py index 1d1e8923d294d0de96d0ff96f78de424fcc143ea..5a660a4bca2c17119edd6679f9f64fa20b10b008 100644 --- a/arkindex/images/management/commands/check_images.py +++ b/arkindex/images/management/commands/check_images.py @@ -71,7 +71,7 @@ class Command(PonosCommand): server_sample = server.images \ .filter(status=S3FileStatus.Checked) \ .order_by('?')[:sample] - logger.info('Re-checking {}Â images in server {}'.format(len(server_sample), server.display_name)) + logger.info('Re-checking {} images in server {}'.format(len(server_sample), server.display_name)) self.check(server_sample) self.check(images) @@ -79,7 +79,7 @@ class Command(PonosCommand): successful, failed = 0, 0 for image in images: - logger.info('Checking image {}Â at {}'.format(str(image.id), image.url)) + logger.info('Checking image {} at {}'.format(str(image.id), image.url)) image.perform_check(save=True) if image.status == S3FileStatus.Checked: successful += 1 diff --git a/arkindex/templates/admin/images/imageserver/merge.html b/arkindex/templates/admin/images/imageserver/merge.html index 3ac635f06f00a54905be5d918770c142b3d48504..cdd8fe33ce4080d2568291eb3f05c61d1a808044 100644 --- a/arkindex/templates/admin/images/imageserver/merge.html +++ b/arkindex/templates/admin/images/imageserver/merge.html @@ -20,7 +20,7 @@ <h2>Summary</h2> <ul> <li> - Will delete {{Â object }} + Will delete {{ object }} </li> {% if object.images.exists %} <li>Will merge {{ object.images.count }} image{{ object.images.count|pluralize }} into the destination server</li>