From 6427e2ab25c83b3904c41c0cdd9f89e6ade82629 Mon Sep 17 00:00:00 2001 From: "Douglas Cerna (Soy Douglas)" Date: Wed, 31 Jan 2024 14:58:38 +0100 Subject: [PATCH] Fix log decoding issues --- src/MCPClient/lib/client/gearman.py | 4 +++- .../lib/clientScripts/archivematicaCreateMETSReingest.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/MCPClient/lib/client/gearman.py b/src/MCPClient/lib/client/gearman.py index 2d24a337dc..1774448e49 100644 --- a/src/MCPClient/lib/client/gearman.py +++ b/src/MCPClient/lib/client/gearman.py @@ -93,7 +93,9 @@ def handle_job(self, task_name, gearman_worker, gearman_job): task_name = str(task_name) job_module = self.job_modules[task_name] logger.debug( - "Gearman job request %s received for %s", gearman_job.unique, task_name + "Gearman job request %s received for %s", + gearman_job.unique.decode(), + task_name, ) with metrics.task_execution_time_histogram.labels(script_name=task_name).time(): diff --git a/src/MCPClient/lib/clientScripts/archivematicaCreateMETSReingest.py b/src/MCPClient/lib/clientScripts/archivematicaCreateMETSReingest.py index 468b303a51..843e0b5cce 100755 --- a/src/MCPClient/lib/clientScripts/archivematicaCreateMETSReingest.py +++ b/src/MCPClient/lib/clientScripts/archivematicaCreateMETSReingest.py @@ -460,7 +460,9 @@ def add_new_files(job, mets, sip_uuid, sip_dir): for f in new_files: # Create amdSecs - job.pyprint("Adding amdSec for", f.currentlocation, "(", str(f.uuid), ")") + job.pyprint( + "Adding amdSec for", f.currentlocation.decode(), "(", str(f.uuid), ")" + ) amdsec, amdid = createmets2.getAMDSec( job, fileUUID=str(f.uuid),