{"record":{"id":"39d31c54f39cbdf5","repo":"mlflow/mlflow","slug":"failed-to-determine-whether-source-name-can","errorCode":null,"errorMessage":"Failed to determine whether {source.__name__} can resolve source information for '{raw_source}'. Exception: {e}","messagePattern":"Failed to determine whether (.+?) can resolve source information for '(.+?)'\\. Exception: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"mlflow/data/dataset_source_registry.py","lineNumber":67,"sourceCode":"                also considered. If unspecified, all registered sources are considered.\n\n        Raises:\n            MlflowException: If no DatasetSource class can resolve the raw source.\n\n        Returns:\n            The resolved DatasetSource.\n        \"\"\"\n        matching_sources = []\n        for source in self.sources:\n            if candidate_sources and not any(\n                issubclass(source, candidate_src) for candidate_src in candidate_sources\n            ):\n                continue\n            try:\n                if source._can_resolve(raw_source):\n                    matching_sources.append(source)\n            except Exception as e:\n                warnings.warn(\n                    f\"Failed to determine whether {source.__name__} can resolve source\"\n                    f\" information for '{raw_source}'. Exception: {e}\",\n                    stacklevel=2,\n                )\n                continue\n\n        if len(matching_sources) > 1:\n            source_class_names_str = \", \".join([source.__name__ for source in matching_sources])\n            warnings.warn(\n                f\"The specified dataset source can be interpreted in multiple ways:\"\n                f\" {source_class_names_str}. MLflow will assume that this is a\"\n                f\" {matching_sources[-1].__name__} source.\",\n                stacklevel=2,\n            )\n\n        for matching_source in reversed(matching_sources):\n            try:\n                return matching_source._resolve(raw_source)","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/mlflow/mlflow/blob/6a27f2decc0b76eb1b54af31849784addb357dbc/mlflow/data/dataset_source_registry.py#L49-L85","documentation":"During DatasetSourceRegistry.resolve(), each registered source's _can_resolve(raw_source) is tried; if one raises, MLflow warns with the source class name and exception, skips that source, and continues with the remaining sources. Resolution may still succeed via another source.","triggerScenarios":"Calling mlflow.data.resolve_dataset_source (or registry.resolve) with a raw source (path/URL) when a registered dataset source's _can_resolve implementation throws on that input.","commonSituations":"A plugin dataset source that assumes a URL format or filesystem access that fails (unreachable URL, bad credentials, malformed path), or a buggy third-party source plugin.","solutions":["Read the embedded exception and the source class name; fix the underlying cause (e.g. correct the URL/path, provide credentials).","Uninstall or update the misbehaving source plugin if it is not required.","If you wrote the source, make _can_resolve robust: return False for unsupported inputs instead of raising.","Verify the raw_source string is well-formed for the intended source type."],"exampleFix":"# before\nsource = mlflow.data.resolve_source(\"http:/malformed-url\")\n\n# after\nsource = mlflow.data.resolve_source(\"https://example.com/data.csv\")","handlingStrategy":"try-catch","validationCode":"from urllib.parse import urlparse\nraw = \"https://example.com/data.csv\"\nparsed = urlparse(raw)\nif not parsed.scheme or parsed.scheme not in {\"http\", \"https\", \"s3\", \"file\", \"gs\"}:\n    raise ValueError(f\"Malformed dataset source: {raw}\")","typeGuard":"def is_well_formed_source(raw) -> bool:\n    return isinstance(raw, str) and len(raw) > 0 and \"://\" in raw or raw.startswith(\"/\")","tryCatchPattern":"import warnings\nwith warnings.catch_warnings(record=True) as caught:\n    warnings.simplefilter(\"always\")\n    source = mlflow.data.resolve_source(raw_source)\nfor w in caught:\n    if \"can resolve source information\" in str(w.message):\n        print(\"a source plugin failed while probing:\", w.message)","preventionTips":["Pass fully qualified URLs/paths (explicit scheme) as dataset sources.","Keep dataset-source plugins updated; remove unused ones.","In custom sources, make _can_resolve return False instead of raising on unsupported inputs.","Verify network/credentials access to the source before resolving."],"tags":["python","plugins","datasets"],"backgroundTag":"dataset-source-resolution-failure","analyzedSha":"6a27f2decc0b76eb1b54af31849784addb357dbc","analyzedAt":"2026-08-29T20:54:51.419Z","schemaVersion":2},"datasetVersion":"2026-08-29T22:17:34.462Z"}