dbt-labs/dbt-core · error

has no method named

Error message

{} has no method named {}

What it means

Method-dispatch guard at the end of MappedSequence::call_method: the requested method name matched no arm and no dynamic fallback resolved it, so the sequence object has no such method. Interpolates the type name and the missing method name.

Solutions

  1. Use a method the MappedSequence implements (values, keys, items, dict, etc.)
  2. Check for typos in the method name in the Jinja template
  3. Extend the call_method dispatch if the method genuinely belongs on this type
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/dbt-agate/src/lib.rs:745 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/9e548b362ad1a5ae. Report an issue: GitHub.

Appendix: source

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

                Ok(value)
            }
            "dict" => {
                assert_nullary_args!("MappedSequence.items", args)?;
                if let Some(dict) = self.dict() {
                    Ok(Value::from_object(dict))
                } else {
                    // trying to approximate a `raise KeyError`
                    Err(minijinja::Error::new(
                        ErrorKind::NonKey,
                        format!("{} type does not define keys()", self.type_name()),
                    ))
                }
            }
            _ => {
                if let Some(value) = self.get_value(&Value::from(name)) {
                    return value.call(state, args, listeners);
                }
                Err(minijinja::Error::new(
                    ErrorKind::UnknownMethod,
                    format!("{} has no method named {}", self.type_name(), name),
                ))
            }
        }
    }

    /// See [`minijinja::Object::render`].
    fn render(self: &Arc<Self>, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        self.fmt(f)
    }

    // impl of the fmt::Display trait for MappedSequence objects -------------------

    /// Used to implement the equivalent of __unicode__, __str__, and __repr__ in Python.
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        let values = self.values();
        let len = values.len();

View on GitHub (pinned to 0267ce9170)