{"record":{"id":"a530393e4a4ea12e","repo":"pola-rs/polars","slug":"could-not-read","errorCode":null,"errorMessage":"could not read","messagePattern":"could not read","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-io/src/mmap.rs","lineNumber":101,"sourceCode":"\nimpl<'a, T: 'a + MmapBytesReader> From<&'a mut T> for ReaderBytes<'a> {\n    fn from(m: &'a mut T) -> Self {\n        match m.to_bytes() {\n            // , but somehow bchk doesn't see that lifetime is 'a.\n            Some(s) => {\n                let s = unsafe { std::mem::transmute::<&[u8], &'a [u8]>(s) };\n                ReaderBytes::Borrowed(s)\n            },\n            None => {\n                if let Some(f) = m.to_file() {\n                    let mmap = MMapSemaphore::new_from_file(f).unwrap();\n                    ReaderBytes::Owned(Buffer::from_owner(mmap))\n                } else {\n                    if verbose() {\n                        eprintln!(\"could not memory map file; read to buffer.\")\n                    }\n                    let mut buf = vec![];\n                    m.read_to_end(&mut buf).expect(\"could not read\");\n                    ReaderBytes::Owned(Buffer::from_vec(buf))\n                }\n            },\n        }\n    }\n}\n","sourceCodeStart":83,"sourceCodeEnd":108,"githubUrl":"https://github.com/pola-rs/polars/blob/df599052daf96e7a9cc30a3b0c6bd25d6947e3c0/crates/polars-io/src/mmap.rs#L83-L108","documentation":"Error \"could not read\" thrown in pola-rs/polars.","triggerScenarios":"Thrown at crates/polars-io/src/mmap.rs:101 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"df599052daf96e7a9cc30a3b0c6bd25d6947e3c0","analyzedAt":"2026-08-16T12:10:03.978Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}