From a70b901072c685c59318dfe2acde17e7712f80de Mon Sep 17 00:00:00 2001 From: aitbc Date: Tue, 26 May 2026 10:58:37 +0200 Subject: [PATCH] fix: correct utils module import path in wallet commands - Fixed path to include /cli directory for utils.dual_mode_wallet_adapter import - Changed from parent.parent.parent to parent.parent.parent.parent / "cli" - Ensures utils module can be found when running wallet commands - Fixes ModuleNotFoundError for utils.dual_mode_wallet_adapter --- cli/aitbc_cli/commands/wallet.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/aitbc_cli/commands/wallet.py b/cli/aitbc_cli/commands/wallet.py index d6f9cf34..c9c8ac4c 100644 --- a/cli/aitbc_cli/commands/wallet.py +++ b/cli/aitbc_cli/commands/wallet.py @@ -122,7 +122,7 @@ def wallet(ctx, wallet_name: Optional[str], wallet_path: Optional[str], use_daem # Initialize dual-mode adapter import sys from pathlib import Path - sys.path.insert(0, str(Path(__file__).parent.parent.parent)) + sys.path.insert(0, str(Path(__file__).parent.parent.parent.parent / "cli")) from utils.dual_mode_wallet_adapter import DualModeWalletAdapter config = get_config() @@ -265,7 +265,8 @@ def list(ctx): # Switch to file mode from ..config import get_config import sys - sys.path.insert(0, '/opt/aitbc/cli') + from pathlib import Path + sys.path.insert(0, str(Path(__file__).parent.parent.parent.parent / "cli")) from utils.dual_mode_wallet_adapter import DualModeWalletAdapter config = get_config() adapter = DualModeWalletAdapter(config, use_daemon=False)