Skip to content

Commit c261d8b

Browse files
committed
fix!: Re-add critical path fix for embedded execution
1 parent 94dcb14 commit c261d8b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

nexus_ark.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# === [CRITICAL FIX FOR EMBEDDED PYTHON] ===
2+
# This block MUST be at the absolute top of the file.
3+
import sys
4+
import os
5+
6+
# Get the absolute path of the directory where this script is located.
7+
# This ensures that even in an embedded environment, Python knows where to find other modules.
8+
script_dir = os.path.dirname(os.path.abspath(__file__))
9+
10+
# Add the script's directory to Python's module search path.
11+
if script_dir not in sys.path:
12+
sys.path.insert(0, script_dir)
13+
# === [END CRITICAL FIX] ===
14+
115
# --- [ロギング設定の強制上書き] ---
216
import logging
317
import logging.config

0 commit comments

Comments
 (0)