{"record":{"id":"0862f7cd6c7421da","repo":"pola-rs/polars","slug":"invalid-profile-name-profile-name-r-expected-on","errorCode":null,"errorMessage":"invalid profile name {profile_name!r}; expected one of {valid_profile_names!r}","messagePattern":"invalid profile name (.+?); expected one of (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/testing/parametric/profiles.py","lineNumber":105,"sourceCode":"        a custom profile with that value).\n\n    Examples\n    --------\n    >>> # prefer the 'balanced' profile for running parametric tests\n    >>> from polars.testing.parametric import set_profile\n    >>> set_profile(\"balanced\")\n    \"\"\"\n    profile_name = str(profile).split(\".\")[-1]\n    if profile_name.replace(\"_\", \"\").isdigit():\n        profile_name = str(int(profile_name))\n\n    else:\n        from typing import get_args\n\n        valid_profile_names = get_args(ParametricProfileNames)\n        if profile_name not in valid_profile_names:\n            msg = f\"invalid profile name {profile_name!r}; expected one of {valid_profile_names!r}\"\n            raise ValueError(msg)\n\n    os.environ[\"POLARS_HYPOTHESIS_PROFILE\"] = profile_name\n","sourceCodeStart":87,"sourceCodeEnd":108,"githubUrl":"https://github.com/pola-rs/polars/blob/9b5d73fd00236295624374b075d16b1fe6ec6df9/py-polars/src/polars/testing/parametric/profiles.py#L87-L108","documentation":"Validation in set_profile (polars.testing.parametric): after normalising the input (taking the last dotted component and translating numeric strings), the profile name is not one of the allowed ParametricProfileNames literals ('fast', 'balanced', 'thorough', etc.). Usually caused by a typo or an unknown custom profile string.","triggerScenarios":"Thrown at py-polars/src/polars/testing/parametric/profiles.py:105 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass one of the valid profile names listed in the error to `load_profile`/`set_profile`, or define a new profile first."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b5d73fd00236295624374b075d16b1fe6ec6df9","analyzedAt":"2026-08-19T12:15:06.350Z","contentChangedAt":"2026-08-19T12:15:06.350Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}