{"record":{"id":"94a1f242d3407fc0","repo":"bevyengine/bevy","slug":"0-in-accessor-1","errorCode":null,"errorMessage":"{0} in accessor {1}","messagePattern":"(.+?) in accessor (.+?)","errorType":"exception","errorClass":"ConvertAttributeError","httpStatus":null,"severity":"error","filePath":"crates/bevy_gltf/src/vertex_attributes.rs","lineNumber":270,"sourceCode":"}\n\nenum ConversionMode {\n    Any,\n    Rgba,\n    JointIndex,\n    JointWeight,\n    TexCoord,\n}\n\n/// Errors that can occur during the `convert_attribute` function.\n#[derive(Error, Debug)]\npub enum ConvertAttributeError {\n    /// The loaded format ws different than the attribute's intended format.\n    /// Such as if a `Float32x3` was loaded as a `Float32x2`.\n    #[error(\"Vertex attribute {0} has format {1:?} but expected {3:?} for target attribute {2}\")]\n    WrongFormat(String, VertexFormat, String, VertexFormat),\n    /// Fetching values from the glTF Accessor failed\n    #[error(\"{0} in accessor {1}\")]\n    AccessFailed(AccessFailed, usize),\n    /// A vertex attribute name was not one of the gltf crate's well-known attributes,\n    /// nor was it registered by a user as a custom attribute. Therefore it is unknown.\n    #[error(\"Unknown vertex attribute {0}\")]\n    UnknownName(String),\n}\n\n/// map glTF vertex attributes into their `MeshVertexAttribute` forms, optionally\n/// converting values if necessary.\npub fn convert_attribute(\n    semantic: gltf::Semantic,\n    accessor: gltf::Accessor,\n    buffer_data: &Vec<Vec<u8>>,\n    custom_vertex_attributes: &HashMap<Box<str>, MeshVertexAttribute>,\n    convert_coordinates: bool,\n) -> Result<(MeshVertexAttribute, Values), ConvertAttributeError> {\n    if let Some((attribute, conversion, convert_coordinates)) = match &semantic {\n        gltf::Semantic::Positions => Some((","sourceCodeStart":252,"sourceCodeEnd":288,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_gltf/src/vertex_attributes.rs#L252-L288","documentation":"ConvertAttributeError::AccessFailed: while converting a glTF vertex attribute, reading values from the glTF accessor failed; the inner AccessFailed error is forwarded with the accessor index.","triggerScenarios":"Thrown at crates/bevy_gltf/src/vertex_attributes.rs:270 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped accessor error (often out-of-bounds or malformed buffer data)","Re-export the glTF asset so accessors are well-formed","Handle the Result from convert_attribute and skip the faulty attribute"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}