We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7997959 commit bea11e2Copy full SHA for bea11e2
1 file changed
agent/main.py
@@ -25,6 +25,15 @@
25
26
from utils import logger
27
28
+# 路径兼容性检测 —— 最早执行,检测含中文/全角字符/中文符号的路径
29
+import re
30
+_cwd = os.getcwd()
31
+if re.search(r"[一-鿿 -〿-]", _cwd):
32
+ logger.warning(
33
+ f"当前运行目录含中文或全角字符: {_cwd}\n"
34
+ "部分组件对此类路径兼容性较差,建议将程序移动至纯英文路径下运行。"
35
+ )
36
+
37
VENV_NAME = ".venv" # 虚拟环境目录的名称
38
VENV_DIR = Path(project_root_dir) / VENV_NAME
39
@@ -398,17 +407,6 @@ def check_and_install_dependencies():
398
407
# -----
399
408
400
409
401
-def _check_chinese_path():
402
- """检测当前程序是否运行在含中文字符的目录下"""
403
- import re
404
-
405
- cwd = os.getcwd()
406
- if re.search(r"[一-鿿]", cwd):
- logger.warning(
- f"当前运行目录含中文字符: {cwd}\n请将程序移动至纯英文路径下运行。"
- )
410
411
412
def _check_admin_privilege():
413
"""检查是否以管理员权限运行,若否则输出警告"""
414
import ctypes
0 commit comments