fix: Resolve ValueError in subprocess.run for stderr redirection

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2026-02-04 11:32:38 -07:00
parent 1e5add8710
commit 3d81ef065b

View File

@@ -28,7 +28,7 @@ def run_pls_command(playlist_id):
"""Runs the docker exec command and returns combined stdout/stderr."""
cmd = ['docker', 'exec', 'navidrome-navidrome-1', '/app/navidrome', 'pls', '-l', 'error', '-np', playlist_id]
try:
result = subprocess.run(cmd, capture_output=True, text=True, check=False, stderr=subprocess.STDOUT)
result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, check=False)
return result.stdout
except FileNotFoundError:
logging.error("Command 'docker' not found. Please ensure it is installed and in your PATH.")