From e7cd0e975a164043c77a3847deab48ebfc9bfdd6 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Mon, 8 Jan 2024 12:16:47 +0100 Subject: [PATCH] PICARD-2813: Log a warning on fpcalc decoding issues --- picard/acoustid/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/picard/acoustid/__init__.py b/picard/acoustid/__init__.py index 65a9b35ad..e1db157ce 100644 --- a/picard/acoustid/__init__.py +++ b/picard/acoustid/__init__.py @@ -222,6 +222,9 @@ class AcoustIDClient(QtCore.QObject): # fpcalc returns the exit code 3 in case of decoding errors that # still allowed it to calculate a result. if exit_code in {FpcalcExit.NOERROR, FpcalcExit.DECODING_ERROR} and exit_status == QtCore.QProcess.ExitStatus.NormalExit: + if exit_code == FpcalcExit.DECODING_ERROR: + error = bytes(process.readAllStandardError()).decode() + log.warning("fpcalc non-critical decoding errors for %s: %s", task.file, error) output = bytes(process.readAllStandardOutput()).decode() jsondata = json.loads(output) # Use only integer part of duration, floats are not allowed in lookup