diff --git a/src/project_layout.rs b/src/project_layout.rs index 278722904..a4e46416a 100644 --- a/src/project_layout.rs +++ b/src/project_layout.rs @@ -144,7 +144,16 @@ impl ProjectResolver { .unwrap_or_default() .to_vec(); let py_root = match pyproject.and_then(|x| x.python_source()) { - Some(py_src) => project_root.join(py_src).normalize()?.into_path_buf(), + Some(py_src) => project_root + .join(py_src) + .normalize() + .with_context(|| { + format!( + "Failed to normalize python source path `{}`", + py_src.display() + ) + })? + .into_path_buf(), None => match pyproject.and_then(|x| x.project_name()) { Some(project_name) => { // Detect src layout