diff --git a/servicex_local/science_images.py b/servicex_local/science_images.py index 5bb1021..c632d31 100644 --- a/servicex_local/science_images.py +++ b/servicex_local/science_images.py @@ -152,7 +152,7 @@ def write_kickoff_script(generated_files_dir: Path) -> None: file_to_run = info["command"] if file_to_run.startswith("/generated/"): - file_to_run = os.path.join(script_dir, file_to_run.removeprefix("/generated/")) + file_to_run = os.path.join(script_dir, file_to_run[len("/generated/"):]) elif not os.path.isabs(file_to_run): file_to_run = os.path.join(script_dir, file_to_run) @@ -283,7 +283,7 @@ def transform( file_to_run = info["command"] if file_to_run.startswith("/generated/"): - file_to_run = os.path.join(script_dir, file_to_run.removeprefix("/generated/")) + file_to_run = os.path.join(script_dir, file_to_run[len("/generated/"):]) elif not os.path.isabs(file_to_run): file_to_run = os.path.join(script_dir, file_to_run)