> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kodeflowstudios.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deserialization Errors (DSR)

> Errors raised while loading and parsing Parley YAML files into runtime objects.

Deserialization errors come from the layer that reads YAML content (from disk, from `Resources/`, or from a string) and converts it into typed Parley objects. They surface when input is missing, unreadable, or malformed.

## DSR01

**File loaded but came back empty.**

The file was located and opened, but its contents were empty after reading. Deserialization cannot proceed without YAML content.

**Common causes**

* The file exists on disk but has zero bytes.
* The file was overwritten or truncated by another process.
* An export or build step produced an empty asset.

**Fix**
Verify the file's contents in a text editor. Re-export or restore the file so it contains valid YAML.

**Thrown by**

* [KodeFlowStudios.Parley.YamlCore.ParleyYaml(string, string, LanguageID?)](/parlite/reference/scripting/yaml-core/parley-yaml#parleyyamlstring-string-languageid)

## DSR02

**Null or empty string passed to `Deserialize<T>` directly.**

The string overload of `Deserialize<T>` was called with `null`, `""`, or whitespace. There is nothing to parse.

**Common causes**

* The caller did not check the result of an upstream load before forwarding it.
* A variable holding YAML text was never assigned.
* A network or file read returned an empty payload that wasn't validated.

**Fix**
Guard the call site so `Deserialize<T>` only runs with non-empty input. If the YAML is supposed to come from a file, use the file-based overloads instead.

**Thrown by**

* [KodeFlowStudios.Parley.YamlCore.ParleyYaml(string, string, LanguageID?)](/parlite/reference/scripting/yaml-core/parley-yaml#parleyyamlstring-string-languageid)

## DSR03

**YAML parse failed (malformed file).**

The content was loaded successfully but is not valid YAML, or does not match the structure expected by the target type.

**Common causes**

* Indentation errors, stray tabs, or unmatched quotes.
* Required fields missing or named incorrectly.
* A value typed as a different shape than the schema expects (e.g. string where a list is required).

**Fix**
Open the file and validate it against the [YAML reference](/parlite/reference/yaml-syntax). Check the inner exception message for the line and column the parser failed on.

**Thrown by**

* [KodeFlowStudios.Parley.YamlCore.ParleyYaml(string, string, LanguageID?)](/parlite/reference/scripting/yaml-core/parley-yaml#parleyyamlstring-string-languageid)

## DSR04

**Resource not found in `Resources/` folder.**

A `Resources.Load`-style lookup returned `null`. Unity could not find an asset at the given resource path.

**Common causes**

* The path was passed with a file extension (Unity's `Resources.Load` expects no extension).
* The file lives outside any folder named `Resources`.
* The asset name or path casing does not match.

**Fix**
Confirm the file is under a `Resources/` folder and pass the path without an extension. Paths are relative to `Resources/` and case-sensitive at runtime on some platforms.

**Thrown by**

* [KodeFlowStudios.Parley.YamlCore.ParleyYaml(string, string, LanguageID?)](/parlite/reference/scripting/yaml-core/parley-yaml#parleyyamlstring-string-languageid)

## DSR05

**File path doesn't exist on disk.**

An absolute or project-relative file path was provided, but no file exists at that location.

**Common causes**

* A typo or stale path in code.
* The file was moved, renamed, or deleted.
* A platform-specific path separator or working directory mismatch.

**Fix**
Check the path on disk before calling. Prefer `Path.Combine` and `Application.streamingAssetsPath` / `Application.persistentDataPath` over hard-coded strings.

**Thrown by**

* [KodeFlowStudios.Parley.YamlCore.ParleyYaml(string, string, LanguageID?)](/parlite/reference/scripting/yaml-core/parley-yaml#parleyyamlstring-string-languageid)

## DSR06

**File exists but couldn't be read.**

The file was found on disk but the read operation failed before any content was returned.

**Common causes**

* File system permissions block read access.
* The file is locked by another process (editor, sync client, antivirus).
* The file is on a network or removable volume that disconnected.

**Fix**
Check OS-level file permissions and close any process that may be holding the file open. The inner `IOException` typically names the underlying cause.

**Thrown by**

* [KodeFlowStudios.Parley.YamlCore.ParleyYaml(string, string, LanguageID?)](/parlite/reference/scripting/yaml-core/parley-yaml#parleyyamlstring-string-languageid)

## DSR07

**Non-`Resources/` path used in a built player.**

Direct file reads only work in the editor. In a built player, the loader was given a path that isn't rooted under `Resources/`, so it has no way to find the file.

**Common causes**

* Hard-coded absolute or project-relative paths shipped into a build.
* Loading a file from `Assets/`, `StreamingAssets/`, or an arbitrary disk location at runtime.
* A path that worked in the editor was reused in a build without adapting it.

**Fix**
Place the YAML under a `Resources/` folder and load it with a `Resources/`-prefixed path, or load the content yourself as a `TextAsset` and pass the string into [Deserialize\<T>](/parlite/reference/scripting/yaml-core/parley-yaml#parleyyamlstring-string-languageid).

**Thrown by**

* [KodeFlowStudios.Parley.YamlCore.ParleyYaml(string, string, LanguageID?)](/parlite/reference/scripting/yaml-core/parley-yaml#parleyyamlstring-string-languageid)
