fix: remove PYTHONPATH from subprocess env to prevent protobuf/mediapipe conflict
This commit is contained in:
@@ -237,7 +237,11 @@ async def process_video(bot, url: str):
|
|||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env["NEXTCLOUD_TARGET"] = target
|
env["NEXTCLOUD_TARGET"] = target
|
||||||
env["PYTHONUNBUFFERED"] = "1"
|
env["PYTHONUNBUFFERED"] = "1"
|
||||||
|
# CRITICAL: Remove PYTHONPATH so the system protobuf doesn't conflict with
|
||||||
|
# the venv's protobuf used by mediapipe → fixes 'SymbolDatabase.GetPrototype' crash
|
||||||
|
env.pop("PYTHONPATH", None)
|
||||||
log.info(f"[process] Temp output dir: {temp_output}")
|
log.info(f"[process] Temp output dir: {temp_output}")
|
||||||
|
log.info(f"[process] PYTHONPATH cleared from subprocess env (mediapipe safety)")
|
||||||
|
|
||||||
# 4. Build command — main.py MUST run with the viral venv Python
|
# 4. Build command — main.py MUST run with the viral venv Python
|
||||||
cmd = [
|
cmd = [
|
||||||
|
|||||||
Reference in New Issue
Block a user