diff --git a/bittensor_cli/src/bittensor/utils.py b/bittensor_cli/src/bittensor/utils.py index b6b05baae..2a7f2b89e 100644 --- a/bittensor_cli/src/bittensor/utils.py +++ b/bittensor_cli/src/bittensor/utils.py @@ -238,11 +238,14 @@ def get_hotkey_wallets_for_wallet( def get_coldkey_wallets_for_path(path: str) -> list[Wallet]: """Gets all wallets with coldkeys from a given path""" wallet_path = Path(path).expanduser() - wallets = [ - Wallet(name=directory.name, path=path) - for directory in wallet_path.iterdir() - if directory.is_dir() - ] + try: + wallets = [ + Wallet(name=directory.name, path=path) + for directory in wallet_path.iterdir() + if directory.is_dir() + ] + except FileNotFoundError: + wallets = [] return wallets