_python_read_paths runs in the sandboxed exec path with no fallback, so an AttributeError or unexpected exception from site.getsitepackages / getusersitepackages (older virtualenv site.py, embedded / frozen Python) would make every sandboxed tool call return an execution error. Guard both calls and continue: sys.prefix / sys.base_prefix are bound regardless, so a venv's site-packages under the prefix stays visible even when these helpers do not resolve. Regression: test_python_read_paths_survives_missing_site_helpers. |
||
|---|---|---|
| .. | ||
| assets | ||
| auth | ||
| core | ||
| hub | ||
| loggers | ||
| models | ||
| plugins | ||
| requirements | ||
| routes | ||
| state | ||
| storage | ||
| tests | ||
| utils | ||
| __init__.py | ||
| _platform_compat.py | ||
| cloudflare_tunnel.py | ||
| colab.py | ||
| main.py | ||
| run.py | ||
| startup_banner.py | ||