dbt-labs/dbt-core · error

OrderedDict has no method named

Error message

OrderedDict has no method named {name}

What it means

Method-dispatch guard in the OrderedDict Jinja object: call_method received a method name that has no matching arm, meaning the template called a method that this OrderedDict emulation does not implement.

Solutions

  1. Use one of the implemented methods (pop, keys, values, items, get, etc.)
  2. Implement the missing method in the OrderedDict call_method dispatch in dbt-agate/src/lib.rs
  3. Check the method name for typos in the Jinja template
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/dbt-agate/src/lib.rs:604 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07). Data as JSON: /api/errors/e6cebd599ebef980. Report an issue: GitHub.

Appendix: source

Thrown at crates/dbt-agate/src/lib.rs:604

                let key = iter.next_arg::<&Value>()?;
                let default = iter.next_kwarg::<Option<&Value>>("default")?;
                iter.finish()?;

                let mut inner = self.inner.lock().expect("lock poisoned");
                if let Some((value, new)) = inner.pop(key) {
                    *inner = new;
                    Ok(value)
                } else if let Some(default) = default {
                    Ok(default.clone())
                } else {
                    Err(minijinja::Error::new(
                        ErrorKind::NonKey,
                        "pop(): key not found",
                    ))
                }
            }

            _ => Err(minijinja::Error::new(
                ErrorKind::UnknownMethod,
                format!("OrderedDict has no method named {name}"),
            )),
        }
    }
}

/// A generic container for immutable data that can be accessed either by
/// numeric index or by key. This is similar to a Python `OrderedDict` except
/// that the keys are optional and iteration over it returns the values instead
/// of keys.
///
/// Implementors should delegate Object and fmt::Display methods to this trait.
pub trait MappedSequence {
    // https://github.com/wireservice/agate/blob/master/agate/mapped_sequence.py

    /// The equivalent of Python's type(self).__name__.
    fn type_name(&self) -> &str {

View on GitHub (pinned to 0267ce9170)