{"record":{"id":"57459e0b73b6f49e","repo":"bevyengine/bevy","slug":"asset-source-must-be-at-least-one-character-eithe","errorCode":null,"errorMessage":"Asset source must be at least one character. Either specify the source before the '://' or remove the `://`","messagePattern":"Asset source must be at least one character\\. Either specify the source before the '://' or remove the `://`","errorType":"exception","errorClass":"ParseAssetPathError","httpStatus":null,"severity":"error","filePath":"crates/bevy_asset/src/path.rs","lineNumber":92,"sourceCode":"        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`].\n    ///\n    /// # Panics\n    /// Panics if the asset path is in an invalid format. Use [`AssetPath::try_parse`] for a fallible variant","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/bevyengine/bevy/blob/8d743eb7dc7fcff57a7d5744d0bbf89620b1b145/crates/bevy_asset/src/path.rs#L74-L110","documentation":"ParseAssetPathError variant raised when a path string contains the '://' source delimiter but the source before it is empty (e.g. '://file.test'). A named source must have at least one character, or the '://' should be removed entirely.","triggerScenarios":"Thrown at crates/bevy_asset/src/path.rs:92 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide the source name before '://' (e.g. 'my_source://file.test')","Remove the '://' to load from the default source with a plain path","Fix string concatenation that produced an empty source prefix"],"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"}