{"record":{"id":"a944a35833aeadfa","repo":"windmill-labs/windmill","slug":"path-must-be-provided-a944a3","errorCode":null,"errorMessage":"path must be provided","messagePattern":"path must be provided","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"python-client/wmill/wmill/client.py","lineNumber":263,"sourceCode":"        # as otherwise the child flow and its own child will store their state in the parent job which will\n        # lead to incorrectness and failures\n        do_not_track_in_parent: bool = True,\n        tag: str = None,\n    ) -> str:\n        \"\"\"Create a flow job and return its job id.\"\"\"\n        args = args or {}\n        params = {\"scheduled_in_secs\": scheduled_in_secs} if scheduled_in_secs else {}\n        if tag:\n            params[\"tag\"] = tag\n        if not do_not_track_in_parent:\n            if os.environ.get(\"WM_JOB_ID\"):\n                params[\"parent_job\"] = os.environ.get(\"WM_JOB_ID\")\n            if os.environ.get(\"WM_ROOT_FLOW_JOB_ID\"):\n                params[\"root_job\"] = os.environ.get(\"WM_ROOT_FLOW_JOB_ID\")\n        if path:\n            endpoint = f\"/w/{self.workspace}/jobs/run/f/{path}\"\n        else:\n            raise Exception(\"path must be provided\")\n        return self.post(endpoint, json=args, params=params).text\n\n    def run_script(\n        self,\n        path: str = None,\n        hash_: str = None,\n        args: dict = None,\n        timeout: dt.timedelta | int | float | None = None,\n        verbose: bool = False,\n        cleanup: bool = True,\n        assert_result_is_not_none: bool = False,\n        tag: str = None,\n    ) -> Any:\n        \"\"\"Run script synchronously and return its result.\n\n        .. deprecated:: Use run_script_by_path or run_script_by_hash instead.\n        \"\"\"\n        logging.warning(","sourceCodeStart":245,"sourceCodeEnd":281,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/python-client/wmill/wmill/client.py#L245-L281","documentation":"Thrown by run_flow_async when no flow path is given. Flows can only be launched by path (/jobs/run/f/<path>) — unlike scripts there is no hash variant — so an empty path leaves no endpoint and the guard fires before building the request.","triggerScenarios":"Calling client.run_flow_async() without the `path` argument, or with path=None/'' (e.g. path sourced from an unset variable).","commonSituations":"Dynamically resolved flow path is empty; call site copied from a script example and never given the flow path; None returned by a lookup used as the path.","solutions":["Pass `path='u/user/flows/my_flow'` to run_flow_async.","Validate the flow exists in the workspace (flows page or GET /w/{workspace}/flows/list).","Guard the path value before calling."],"exampleFix":"// before\njob = client.run_flow_async(args={})  # path missing\n// after\njob = client.run_flow_async(path='u/admin/flows/daily_sync', args={})","handlingStrategy":"validation","validationCode":"if not flow_path:\n    raise ValueError('flow_path must be a non-empty string before run_flow_async')","typeGuard":null,"tryCatchPattern":"try:\n    job = client.run_flow_async(path=flow_path, args=args)\nexcept Exception as e:\n    if 'path must be provided' in str(e):\n        raise ValueError('Flow path missing — check your flow_path config') from e\n    raise","preventionTips":["Validate flow_path is non-empty at startup, not at call time.","Keep flow paths in a constant/config module instead of ad-hoc strings.","Confirm the flow exists in the workspace before scheduling runs."],"tags":["validation","arguments","flow","python"],"backgroundTag":"missing-required-argument","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}