Skip to content

Commit

Permalink
[client] fix None value for Client's SyftWorkspace
Browse files Browse the repository at this point in the history
  • Loading branch information
khoaguin committed Oct 16, 2024
1 parent 30e9183 commit cc021e6
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions syftbox/lib/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ class Client(Jsonable):
default_factory=lambda: ["init", "create_datasite", "sync", "apps"]
)
_server_client: httpx.Client | None = None
_workspace: SyftWorkspace | None = None
_workspace: SyftWorkspace | None = SyftWorkspace()

@property
def is_registered(self) -> bool:
Expand Down Expand Up @@ -667,18 +667,11 @@ def load_or_create_config(args: argparse.Namespace) -> ClientConfig:
except Exception:
pass

if client_config is None and args.config_path:
config_path = Path(args.config_path).expanduser().resolve()
client_config = ClientConfig(config_path=str(config_path))

if client_config is None:
# config_path = get_user_input("Path to config file?", DEFAULT_CONFIG_PATH)
config_path = Path(args.config_path).expanduser().resolve()
client_config = ClientConfig(config_path=str(config_path))

workspace = SyftWorkspace()
client_config._workspace = workspace

if args.sync_folder:
sync_folder = Path(args.sync_folder).expanduser().resolve()
client_config.sync_folder = str(sync_folder)
Expand Down

0 comments on commit cc021e6

Please sign in to comment.