astral-sh/uv · error · anyhow::Error
Hash-checking is not supported for local directories: {}
Error message
Hash-checking is not supported for local directories: {} What it means
Error "Hash-checking is not supported for local directories: {}" thrown in astral-sh/uv.
Source
Thrown at crates/uv-requirements/src/source_tree.rs:213
}
let Ok(url) = Url::from_directory_path(path).map(DisplaySafeUrl::from_url) else {
return Err(anyhow::anyhow!("Failed to convert path to URL"));
};
let source = SourceUrl::Directory(DirectorySourceUrl {
url: &url,
install_path: path,
editable: None,
});
// Determine the hash policy. Since we don't have a package name, we perform a
// manual match.
let hashes = match self.hasher {
HashStrategy::None => HashPolicy::None,
HashStrategy::Generate(mode) => HashPolicy::Generate(*mode),
HashStrategy::Verify(_) => HashPolicy::Generate(HashGeneration::All),
HashStrategy::Require(_) => {
return Err(anyhow::anyhow!(
"Hash-checking is not supported for local directories: {}",
path.user_display()
));
}
};
// Fetch the metadata for the distribution.
let metadata = {
let id = source.distribution_id();
if let Some(response) = self.index.distributions().register_or_wait(&id).await {
let MetadataResponse::Found(archive) = &*response else {
panic!("Failed to find metadata for: {}", path.user_display());
};
archive.metadata.clone()
} else {
// Run the PEP 517 build process to extract metadata from the source distribution.
let source = BuildableSource::Url(source);
let archive = self.database.build_wheel_metadata(&source, hashes).await?;View on GitHub (pinned to f1a42680ff)
When it happens
Trigger: Thrown at crates/uv-requirements/src/source_tree.rs:213 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of astral-sh/uv@f1a42680ff (2026-08-16).
Data as JSON: /api/errors/386652661c5dc38a.
Report an issue: GitHub.