diff --git a/polars/polars-lazy/polars-plan/src/logical_plan/builder.rs b/polars/polars-lazy/polars-plan/src/logical_plan/builder.rs index 5561f42e10f2..83f546d828b6 100644 --- a/polars/polars-lazy/polars-plan/src/logical_plan/builder.rs +++ b/polars/polars-lazy/polars-plan/src/logical_plan/builder.rs @@ -253,12 +253,8 @@ impl LogicalPlanBuilder { try_parse_dates: bool, ) -> PolarsResult { let path = path.into(); - let mut file = std::fs::File::open(&path).map_err(|e| { - polars_err!( - Io: "error open file: '{:?}', {:?}", - path, e - ) - })?; + let mut file = std::fs::File::open(&path) + .map_err(|e| polars_err!(ComputeError: "error open file: '{:?}', {:?}", path, e))?; let mut magic_nr = [0u8; 2]; file.read_exact(&mut magic_nr) .map_err(|_| polars_err!(NoData: "empty csv"))?;