Skip to content

fixes #408 [Lidarr] Use python3 for pyxdameraulevenshtein calls#410

Open
barrettclark wants to merge 1 commit intoRandomNinjaAtk:mainfrom
barrettclark:fix/lidarr-python3-fuzzy-match
Open

fixes #408 [Lidarr] Use python3 for pyxdameraulevenshtein calls#410
barrettclark wants to merge 1 commit intoRandomNinjaAtk:mainfrom
barrettclark:fix/lidarr-python3-fuzzy-match

Conversation

@barrettclark
Copy link
Copy Markdown

Fixes #408

Problem

All 4 calls to pyxdameraulevenshtein in Audio.service.bash used python -c instead of python3 -c. On Alpine-based containers (linuxserver/lidarr), python may not be symlinked to Python 3. When the call fails silently (2>/dev/null), $diff is empty and the integer comparison fails:

./run: line 1495: [: : integer expression expected

This causes every album title comparison to fail, producing an infinite retry loop and heavy log spam. Previously reported in #180 and closed as user error, but the fix belongs in the script.

Fix

Change all 4 occurrences of python -c to python3 -c (lines 1494, 1571, 1643, 1701).

pyxdameraulevenshtein is already correctly installed by setup.bash — this is purely an interpreter name fix.

…in calls

All 4 occurrences of pyxdameraulevenshtein used 'python -c' instead of
'python3 -c'. On Alpine-based containers python may not be symlinked to
python3, causing silent failures. When the call returns empty, the integer
comparison [ "$diff" -le "$matchDistance" ] throws 'integer expression
expected' and the album match loop runs indefinitely.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] [Lidarr] "integer expression expected" from pyxdameraulevenshtein calls using 'python' instead of 'python3'

1 participant