bevyengine/bevy · error · TryRunScheduleError

The schedule with the label {0:?} was not found.

Error message

The schedule with the label {0:?} was not found.

What it means

TryRunScheduleError: World::try_run_schedule was called with a schedule label that has never been added to this world, so there is no schedule to run.

Source

Thrown at crates/bevy_ecs/src/world/error.rs:16

//! Contains error types returned by bevy's schedule.

use alloc::vec::Vec;
use bevy_utils::prelude::DebugName;

use crate::{
    component::ComponentId,
    entity::{Entity, EntityNotSpawnedError},
    schedule::InternedScheduleLabel,
};

/// The error type returned by [`World::try_run_schedule`] if the provided schedule does not exist.
///
/// [`World::try_run_schedule`]: crate::world::World::try_run_schedule
#[derive(thiserror::Error, Debug)]
#[error("The schedule with the label {0:?} was not found.")]
pub struct TryRunScheduleError(pub InternedScheduleLabel);

/// The error type returned by [`World::try_insert_batch`] and [`World::try_insert_batch_if_new`]
/// if any of the provided entities do not exist.
///
/// [`World::try_insert_batch`]: crate::world::World::try_insert_batch
/// [`World::try_insert_batch_if_new`]: crate::world::World::try_insert_batch_if_new
#[derive(thiserror::Error, Debug, Clone)]
#[error("Could not insert bundles of type {bundle_type} into the entities with the following IDs because they do not exist: {entities:?}")]
pub struct TryInsertBatchError {
    /// The bundles' type name.
    pub bundle_type: DebugName,
    /// The IDs of the provided entities that do not exist.
    pub entities: Vec<Entity>,
}

/// An error that occurs when a specified [`Entity`] could not be despawned.
#[derive(thiserror::Error, Debug, Clone, Copy)]

View on GitHub (pinned to 396ca72708)

Solutions

  1. Add the schedule first via world.add_schedule(...) / app.add_schedule(...) with the same label
  2. Check the returned Result — try_run_schedule exists precisely for this case
  3. Verify the label type is the same interned type used when adding
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at crates/bevy_ecs/src/world/error.rs:16 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of bevyengine/bevy@396ca72708 (2026-08-20). Data as JSON: /api/errors/ce4aab15e0276c88. Report an issue: GitHub.