Skip to content

fix: quote PYTHON_PATH in install.sh for paths with spaces#10054

Closed
nightq wants to merge 7 commits into
NousResearch:mainfrom
nightq:fix/issue-10009-install-sh-quoted-paths
Closed

fix: quote PYTHON_PATH in install.sh for paths with spaces#10054
nightq wants to merge 7 commits into
NousResearch:mainfrom
nightq:fix/issue-10009-install-sh-quoted-paths

Conversation

@nightq

@nightq nightq commented Apr 15, 2026

Copy link
Copy Markdown

Summary

Fixes install.sh silently failing on macOS when uv manages Python in paths containing spaces (e.g., ~/Library/Application Support/uv/).

Root Cause

check_python() used unquoted \$PYTHON_PATH in command substitutions. When uv returns a path like ~/Library/Application Support/uv/python/cpython-3.11.9-macos-aarch64-none/bin/python3, the shell splits it at the space and tries to execute Library/Application as a command. With set -e, this silently aborts the entire script.

Fix

Quote all \$PYTHON_PATH usages in check_python() — both in version checks and the --version call.

Test Plan

  • Shell script — verified syntax correctness
  • The fix is a straightforward quoting change with no behavioral impact for paths without spaces

Closes #10009

nightq added 7 commits April 15, 2026 11:41
Fixes NousResearch#9999

Root cause: _sanitize_api_messages compared raw tool_call_id strings
without stripping whitespace, causing valid tool results to be treated
as orphaned when IDs had leading/trailing spaces.
Fix: strip whitespace in _get_tool_call_id_static and when collecting
result_call_ids from tool messages.
Fixes NousResearch#9980

Root cause: _send_raw_message hardcoded 'chat_id' as receive_id_type,
causing [230001] invalid receive_id errors when sending to user open_ids
(prefix 'ou_') or union_ids (prefix 'on_').
Fix: Add _detect_receive_id_type() that checks ID prefix (oc_→chat_id,
ou_→open_id, on_→union_id) and use it in _send_raw_message.
Fixes NousResearch#9950

Root cause: Prompts discarded for having no reasoning were not added to
completed_in_batch, causing --resume to retry them indefinitely.
Fix: Append prompt_index to completed_in_batch before continuing past
the discard branch.
… env var

Fixes NousResearch#9869

Root cause: Hindsight cloud client had hardcoded 30s timeout, causing
hindsight_reflect to fail for longer operations.
Fix: Read timeout from HINDSIGHT_TIMEOUT env var with default of 300s.
…t cwd

Fixes NousResearch#9949

Root cause: Relative paths in skills.external_dirs were resolved against
the process cwd via Path.resolve(), causing inconsistent behavior across
CLI/gateway/cron contexts.
Fix: Check if the path is relative and resolve it against the config
file's parent directory instead of cwd.
Fixes NousResearch#9948

Root cause: add_provider() set _has_external=True and appended to
_providers BEFORE calling get_tool_schemas(). If schemas raised, the
manager was left in a half-registered state that blocked all future
external providers.
Fix: Call get_tool_schemas() first and only mutate state after it
succeeds.
Fixes NousResearch#10009

Root cause: install.sh used unquoted $PYTHON_PATH in command
substitutions, causing failures on macOS where uv manages Python in
~/Library/Application Support/uv/ (path contains spaces).
Fix: Quote all $PYTHON_PATH usages in check_python().
@teknium1

Copy link
Copy Markdown
Contributor

Closed in favor of PR #13001 #13001 which fixes the same issue. The unrelated changes bundled here (feishu, batch_runner, etc.) should be submitted as separate PRs. Thanks @nightq!

@teknium1 teknium1 closed this Apr 20, 2026
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]: install.sh fails on macOS due to unquoted spaces in Python path (uv)

2 participants