Skip to content

fix(funasr): sanitize system Python environment - #62

Open
LauraGPT wants to merge 1 commit into
yan5xu:mainfrom
LauraGPT:codex/fix-system-python-env
Open

fix(funasr): sanitize system Python environment#62
LauraGPT wants to merge 1 commit into
yan5xu:mainfrom
LauraGPT:codex/fix-system-python-env

Conversation

@LauraGPT

Copy link
Copy Markdown

Summary

  • remove inherited embedded-Python path variables when QuQu uses a system Python
  • add a focused node:test regression test and npm run test:unit entry point

Context

In the system-Python branch, buildPythonEnvironment() starts by copying process.env. It previously avoided assigning embedded values, but did not remove existing PYTHONHOME, PYTHONPATH, LD_LIBRARY_PATH, or DYLD_LIBRARY_PATH entries inherited from the launcher or an earlier runtime setup.

Those stale paths can make the selected system Python fail before the model-download script starts, commonly with ModuleNotFoundError: No module named 'encodings'.

The original environment handling reported in #61 is already improved on main compared with the v1.0.1 tag. This PR adds the remaining defensive cleanup plus a regression test so the failure does not return through inherited process state.

Verification

  • npm run test:unit (1 passed)
  • git diff --check

Related to #61.

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.

1 participant