Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hermes_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ def _probe_container(cmd: list, backend: str, via_sudo: bool = False):
all other exceptions propagate naturally.
"""
try:
return subprocess.run(cmd, capture_output=True, text=True, timeout=15)
return subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8", timeout=15)
except subprocess.TimeoutExpired:
label = f"sudo {backend}" if via_sudo else backend
print(
Expand Down
2 changes: 1 addition & 1 deletion hermes_cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@ def setup_terminal_backend(config: dict):
ssh_cmd.extend(["-p", port])
ssh_cmd.append(f"{user}@{host}" if user else host)
ssh_cmd.append("echo ok")
result = subprocess.run(ssh_cmd, capture_output=True, text=True, timeout=10)
result = subprocess.run(ssh_cmd, capture_output=True, text=True, encoding="utf-8", timeout=10)
if result.returncode == 0:
print_success(" SSH connection successful!")
else:
Expand Down
2 changes: 1 addition & 1 deletion skills/creative/comfyui/scripts/auto_fix_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def run_cmd(cmd: list[str], *, dry_run: bool = False) -> tuple[int, str]:
if dry_run:
return 0, "[dry-run]"
log(f"$ {' '.join(cmd)}")
proc = subprocess.run(cmd, capture_output=True, text=True, check=False)
proc = subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8", check=False)
out = (proc.stdout or "") + (proc.stderr or "")
return proc.returncode, out

Expand Down
2 changes: 1 addition & 1 deletion tools/environments/singularity.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def _start_instance(self):
cmd.extend([str(self.image), self.instance_id])

try:
result = subprocess.run(cmd, capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL)
result = subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8", timeout=120, stdin=subprocess.DEVNULL)
if result.returncode != 0:
raise RuntimeError(f"Failed to start instance: {result.stderr}")
self._instance_started = True
Expand Down
6 changes: 3 additions & 3 deletions tools/transcription_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ def _prepare_local_audio(file_path: str, work_dir: str) -> tuple[Optional[str],
command = [ffmpeg, "-y", "-i", file_path, converted_path]

try:
subprocess.run(command, check=True, capture_output=True, text=True, timeout=300, stdin=subprocess.DEVNULL)
subprocess.run(command, check=True, capture_output=True, text=True, encoding="utf-8", timeout=300, stdin=subprocess.DEVNULL)
return converted_path, None
except subprocess.TimeoutExpired:
logger.error("ffmpeg conversion timed out for %s", file_path)
Expand Down Expand Up @@ -1233,9 +1233,9 @@ def _transcribe_local_command(file_path: str, model_name: str) -> Dict[str, Any]
# User-provided templates (env var) may contain shell syntax; auto-detected commands are safe for list mode.
use_shell = bool(os.getenv(LOCAL_STT_COMMAND_ENV, "").strip())
if use_shell:
subprocess.run(command, shell=True, check=True, capture_output=True, text=True, timeout=300, stdin=subprocess.DEVNULL)
subprocess.run(command, shell=True, check=True, capture_output=True, text=True, encoding="utf-8", timeout=300, stdin=subprocess.DEVNULL)
else:
subprocess.run(shlex.split(command), check=True, capture_output=True, text=True, timeout=300, stdin=subprocess.DEVNULL)
subprocess.run(shlex.split(command), check=True, capture_output=True, text=True, encoding="utf-8", timeout=300, stdin=subprocess.DEVNULL)


txt_files = sorted(Path(output_dir).glob("*.txt"))
Expand Down
2 changes: 1 addition & 1 deletion tools/tts_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1859,7 +1859,7 @@ def _generate_neutts(text: str, output_path: str, tts_config: Dict[str, Any]) ->
"--device", device,
]

result = subprocess.run(cmd, capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL)
result = subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8", timeout=120, stdin=subprocess.DEVNULL)
if result.returncode != 0:
stderr = result.stderr.strip()
# Filter out the "OK:" line from stderr
Expand Down
4 changes: 2 additions & 2 deletions tools/voice_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def start(self, on_silence_stop=None) -> None:
"-c", str(CHANNELS),
]
try:
subprocess.run(command, capture_output=True, text=True, timeout=15, check=True, stdin=subprocess.DEVNULL)
subprocess.run(command, capture_output=True, text=True, encoding="utf-8", timeout=15, check=True, stdin=subprocess.DEVNULL)
except subprocess.CalledProcessError as e:
details = (e.stderr or e.stdout or str(e)).strip()
raise RuntimeError(f"Termux microphone start failed: {details}") from e
Expand All @@ -406,7 +406,7 @@ def _stop_termux_recording(self) -> None:
mic_cmd = _termux_microphone_command()
if not mic_cmd:
return
subprocess.run([mic_cmd, "-q"], capture_output=True, text=True, timeout=15, check=False, stdin=subprocess.DEVNULL)
subprocess.run([mic_cmd, "-q"], capture_output=True, text=True, encoding="utf-8", timeout=15, check=False, stdin=subprocess.DEVNULL)

def stop(self) -> Optional[str]:
with self._lock:
Expand Down
2 changes: 1 addition & 1 deletion tui_gateway/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -8993,7 +8993,7 @@ def _(rid, params: dict) -> dict:
str(pdf_path), str(out_prefix),
]
try:
res = subprocess.run(argv, capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL)
res = subprocess.run(argv, capture_output=True, text=True, encoding="utf-8", timeout=120, stdin=subprocess.DEVNULL)
except subprocess.TimeoutExpired:
return _err(rid, 5028, "pdftoppm timed out (>120s)")
if res.returncode != 0:
Expand Down