We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 27bc755 commit 43cbe0dCopy full SHA for 43cbe0d
src/isolate/connections/_local/agent_startup.py
@@ -6,6 +6,7 @@
6
import runpy
7
import site
8
import sys
9
+import traceback
10
11
12
def load_pth_files() -> None:
@@ -28,7 +29,13 @@ def load_pth_files() -> None:
28
29
# will need to be fixed once we are dealing with more than 2 nodes and editable
30
# packages.
31
for site_dir in python_path.split(os.pathsep):
- site.addsitedir(site_dir)
32
+ try:
33
+ site.addsitedir(site_dir)
34
+ except Exception:
35
+ # NOTE: there could be .pth files that are model weights and not
36
+ # python path configuration files.
37
+ traceback.print_exc()
38
+ print(f"Error adding site directory {site_dir}, skipping...")
39
40
41
def main():
0 commit comments