{"record":{"id":"62e1bdb797989141","repo":"mlflow/mlflow","slug":"resource-does-not-exist-62e1bd","errorCode":"RESOURCE_DOES_NOT_EXIST","errorMessage":"Could not find experiment with name {experiment_name}","messagePattern":"Could not find experiment with name (.+?)","errorType":"error_code","errorClass":"MlflowException","httpStatus":404,"severity":"error","filePath":"mlflow/server/auth/__init__.py","lineNumber":911,"sourceCode":"    if MLFLOW_ENABLE_WORKSPACES.get():\n        if workspace_name := workspace_context.get_request_workspace():\n            user = store.get_user(username)\n            perm = store.get_role_permission_for_resource(user.id, \"workspace\", \"*\", workspace_name)\n            if perm is not None:\n                return perm\n            # Honor the default-workspace auto-grant when configured.\n            if _user_inherits_default_workspace_grant(workspace_name):\n                return get_permission(auth_config.default_permission)\n        return NO_PERMISSIONS\n\n    return get_permission(auth_config.default_permission)\n\n\ndef _get_permission_from_experiment_name() -> Permission:\n    experiment_name = _get_request_param(\"experiment_name\")\n    store_exp = _get_tracking_store().get_experiment_by_name(experiment_name)\n    if store_exp is None:\n        raise MlflowException(\n            f\"Could not find experiment with name {experiment_name}\",\n            error_code=RESOURCE_DOES_NOT_EXIST,\n        )\n    username = authenticate_request().username\n\n    return _get_role_permission_or_default(\n        _role_permission_for(\n            username=username,\n            resource_type=\"experiment\",\n            resource_key=store_exp.experiment_id,\n            workspace_lookup_id=store_exp.experiment_id,\n            workspace_fetcher=_get_tracking_store().get_experiment,\n            workspace_label=\"experiment\",\n        ),\n    )\n\n\ndef _get_permission_from_run_id() -> Permission:","sourceCodeStart":893,"sourceCodeEnd":929,"githubUrl":"https://github.com/mlflow/mlflow/blob/6a27f2decc0b76eb1b54af31849784addb357dbc/mlflow/server/auth/__init__.py#L893-L929","documentation":"Raised by _get_permission_from_experiment_name when the tracking store has no experiment matching the supplied experiment_name. The auth middleware must resolve the experiment to evaluate permissions, so a missing name yields RESOURCE_DOES_NOT_EXIST.","triggerScenarios":"Requesting an experiment permission check (validate_can_read_experiment_by_name path) with an experiment_name that was never created, was deleted, or is named differently in the configured tracking store (e.g. different backend or workspace).","commonSituations":"Typos in experiment names in notebooks/scripts; pointing a client at a different tracking store (staging vs prod) where the name doesn't exist; deleted experiments (soft-deleted ones no longer resolve); case-sensitivity mismatches.","solutions":["Call client.get_experiment_by_name(name) first and handle None before hitting the guarded endpoint","Use the experiment_id instead of the name if you have it","Verify the tracking URI points at the store containing the experiment","Check the exact name via the UI or search_experiments; names are matched literally"],"exampleFix":"// before\nexp = client.get_experiment_by_name('My-Experiment')  # auth resolves name\n// after\nexp = client.get_experiment_by_name('My Experiment')\nif exp is None: raise SystemExit(f'no such experiment: My Experiment')","handlingStrategy":"try-catch","validationCode":"exp = client.get_experiment_by_name(experiment_name)\nif exp is None:\n    raise SystemExit(f'Experiment {experiment_name!r} not found in {client.tracking_uri}')","typeGuard":null,"tryCatchPattern":"try:\n    do_authenticated_call(experiment_name=name)\nexcept MlflowException as e:\n    if e.error_code == 'RESOURCE_DOES_NOT_EXIST' and 'experiment' in str(e):\n        exps = client.search_experiments(filter_string=f\"name = '{name}'\")\n        if not exps:\n            raise SystemExit(f'no experiment named {name}')\n    else:\n        raise","preventionTips":["Resolve names to experiment_id once and reuse the ID","Verify MLFLOW_TRACKING_URI points at the store that holds the experiment","Remember deleted experiments no longer resolve by name"],"tags":["auth","tracking","not-found","experiments"],"backgroundTag":"resource-not-found","analyzedSha":"6a27f2decc0b76eb1b54af31849784addb357dbc","analyzedAt":"2026-08-29T20:54:51.419Z","schemaVersion":2},"datasetVersion":"2026-08-29T22:17:34.462Z"}