diff --git a/datashuttle/utils/formatting.py b/datashuttle/utils/formatting.py index 5e8cabbe3..1e1827fdc 100644 --- a/datashuttle/utils/formatting.py +++ b/datashuttle/utils/formatting.py @@ -368,10 +368,17 @@ def warn_on_inconsistent_sub_or_ses_leading_zeros( subject or session names, the number of leading zeros must be consistent across local and central projects. """ - ( - subs_are_inconsistent, - ses_are_inconsistent, - ) = project_has_inconsistent_num_leading_zeros(cfg) + try: + ( + subs_are_inconsistent, + ses_are_inconsistent, + ) = project_has_inconsistent_num_leading_zeros(cfg) + except: + warnings.warn( + "Could not search local and remote respoistories. " + "Leading zero consistency checks not performed." + ) + return failing_cases = list( compress(["sub", "ses"], [subs_are_inconsistent, ses_are_inconsistent]) diff --git a/tests/test_utils.py b/tests/test_utils.py index c04126054..963a2f16a 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -249,6 +249,7 @@ def get_default_folder_used(): def get_config_path_with_cli(project_name=None): stdout = run_cli(" show_config_path", project_name) + breakpoint() path_ = stdout[0].split(".yaml")[0] + ".yaml" return path_ diff --git a/tests/tests_integration/test_command_line_interface.py b/tests/tests_integration/test_command_line_interface.py index 4180a764b..28559ff5d 100644 --- a/tests/tests_integration/test_command_line_interface.py +++ b/tests/tests_integration/test_command_line_interface.py @@ -389,7 +389,6 @@ def test_make_config_file_not_defaults( ) config_path = test_utils.get_config_path_with_cli(clean_project_name) - test_utils.check_config_file(config_path, changed_configs) def test_make_sub_folders(self, setup_project):