{"record":{"id":"fe916a2343e2c018","repo":"bevyengine/bevy","slug":"asset-label-must-not-contain-a-substring","errorCode":null,"errorMessage":"Asset label must not contain a `://` substring","messagePattern":"Asset label must not contain a `://` substring","errorType":"exception","errorClass":"ParseAssetPathError","httpStatus":null,"severity":"error","filePath":"crates/bevy_asset/src/path.rs","lineNumber":89,"sourceCode":"        if let AssetSourceId::Name(name) = self.source() {\n            write!(f, \"{name}://\")?;\n        }\n        write!(f, \"{}\", self.path.display())?;\n        if let Some(label) = &self.label {\n            write!(f, \"#{label}\")?;\n        }\n        Ok(())\n    }\n}\n\n/// An error that occurs when parsing a string type to create an [`AssetPath`] fails, such as during [`AssetPath::parse`].\n#[derive(Error, Debug, PartialEq, Eq)]\npub enum ParseAssetPathError {\n    /// Error that occurs when the [`AssetPath::source`] section of a path string contains the [`AssetPath::label`] delimiter `#`. E.g. `bad#source://file.test`.\n    #[error(\"Asset source must not contain a `#` character\")]\n    InvalidSourceSyntax,\n    /// Error that occurs when the [`AssetPath::label`] section of a path string contains the [`AssetPath::source`] delimiter `://`. E.g. `source://file.test#bad://label`.\n    #[error(\"Asset label must not contain a `://` substring\")]\n    InvalidLabelSyntax,\n    /// Error that occurs when a path string has an [`AssetPath::source`] delimiter `://` with no characters preceding it. E.g. `://file.test`.\n    #[error(\"Asset source must be at least one character. Either specify the source before the '://' or remove the `://`\")]\n    MissingSource,\n    /// Error that occurs when a path string has an [`AssetPath::label`] delimiter `#` with no characters succeeding it. E.g. `file.test#`\n    #[error(\"Asset label must be at least one character. Either specify the label after the '#' or remove the '#'\")]\n    MissingLabel,\n}\n\nimpl<'a> AssetPath<'a> {\n    /// Creates a new [`AssetPath`] from a string in the asset path format:\n    /// * An asset at the root: `\"scene.gltf\"`\n    /// * An asset nested in some folders: `\"some/path/scene.gltf\"`\n    /// * An asset with a \"label\": `\"some/path/scene.gltf#Mesh0\"`\n    /// * An asset with a custom \"source\": `\"custom://some/path/scene.gltf#Mesh0\"`\n    ///\n    /// Prefer [`From<'static str>`] for static strings, as this will prevent allocations\n    /// and reference counting for [`AssetPath::into_owned`].","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/bevyengine/bevy/blob/8d743eb7dc7fcff57a7d5744d0bbf89620b1b145/crates/bevy_asset/src/path.rs#L71-L107","documentation":"ParseAssetPathError variant for a label containing the source delimiter '://' (e.g. 'file.test#label://x'). Since '://' marks the start of a source prefix, such a label cannot be parsed unambiguously and is rejected.","triggerScenarios":"Thrown at crates/bevy_asset/src/path.rs:89 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the '://' sequence from the subasset label","Check for a malformed path where the label and source sections are swapped","Rename the subasset label to a delimiter-free string"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8d743eb7dc7fcff57a7d5744d0bbf89620b1b145","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}