{"record":{"id":"6012f894a5f46e87","repo":"mlflow/mlflow","slug":"internal-error-6012f8","errorCode":"INTERNAL_ERROR","errorMessage":"Artifact destination was not resolved for artifact {artifact.names[0]!r}.","messagePattern":"Artifact destination was not resolved for artifact (.+?)\\.","errorType":"error_code","errorClass":"MlflowException","httpStatus":null,"severity":"error","filePath":"mlflow/pyfunc/model.py","lineNumber":208,"sourceCode":"        raise MlflowException.invalid_parameter_value(\n            f\"The artifact repository returned a missing path for artifact {artifact_name!r}.\"\n        )\n    if \"..\" in flat_root.parts:\n        raise MlflowException.invalid_parameter_value(\n            \"The artifact repository returned a non-normalized path containing '..' for \"\n            f\"artifact {artifact_name!r}.\"\n        )\n    return flat_root\n\n\ndef _move_downloaded_artifacts(\n    model_path: Path, artifacts: list[_DownloadedArtifact]\n) -> dict[str, dict[str, str]]:\n    artifacts_dir = model_path / \"artifacts\"\n    saved_artifacts_config = {}\n    for artifact in artifacts:\n        if artifact.final_root is None:\n            raise MlflowException(\n                f\"Artifact destination was not resolved for artifact {artifact.names[0]!r}.\"\n            )\n        destination = artifacts_dir / artifact.final_root\n        validate_path_within_directory(str(artifacts_dir), str(destination))\n\n        if artifact.final_root.parts:\n            destination.parent.mkdir(parents=True, exist_ok=True)\n        if os.path.lexists(destination):\n            raise MlflowException.invalid_parameter_value(\n                f\"Cannot save artifact {artifact.names[0]!r} because destination \"\n                f\"{destination.relative_to(model_path).as_posix()!r} already exists.\"\n            )\n        shutil.move(str(artifact.source_root), str(destination))\n\n        saved_artifact_subpath = destination.relative_to(model_path).as_posix()\n        for artifact_name in artifact.names:\n            saved_artifacts_config[artifact_name] = {\n                CONFIG_KEY_ARTIFACT_RELATIVE_PATH: saved_artifact_subpath,","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/mlflow/mlflow/blob/6a27f2decc0b76eb1b54af31849784addb357dbc/mlflow/pyfunc/model.py#L190-L226","documentation":"Internal invariant failure during _move_downloaded_artifacts: every downloaded artifact must have a resolved final destination (final_root), but this one is None. This indicates an MLflow bug, not user error.","triggerScenarios":"Calling mlflow.pyfunc.save_model/log_model with class artifacts when a downloaded artifact never got its destination resolved by _validate_downloaded_artifact (unexpected code path).","commonSituations":"Should not occur in normal use; if it does, it points to a custom PythonModel/artifact hook that skipped validation or an MLflow version bug.","solutions":["Upgrade MLflow to the latest patch version","File a bug report with a reproduction script","As a workaround, log the model without class artifacts and attach artifacts separately"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from mlflow.exceptions import MlflowException\ntry:\n    mlflow.pyfunc.save_model(...)\nexcept MlflowException as e:\n    if \"was not resolved\" in str(e):\n        report_mlflow_bug(e)\n    else:\n        raise","preventionTips":["Keep MLflow up to date","Avoid overriding internal artifact-handling hooks","File a reproducible bug if it occurs"],"tags":["mlflow","pyfunc","internal-error","artifacts"],"backgroundTag":"internal-invariant-violation","analyzedSha":"6a27f2decc0b76eb1b54af31849784addb357dbc","analyzedAt":"2026-08-29T20:54:51.419Z","schemaVersion":2},"datasetVersion":"2026-08-29T22:17:34.462Z"}