Skip to content

Filter Values raises AttributeError for ordinary text inputs #15729

Open

Description

@LimbC-C

Bug Description

The legacy Filter Values (FilterDataValues / DataFilterComponent) component raises AttributeError: 'str' object has no attribute 'text' when its Filter Key and Filter Value are ordinary text, including the default values. Data/JSON/Message values passed through normal input validation also become text and hit the same error.

The component has no replacement (replacement = []), so saved flows still need this operation. filter_data() reads .text even though MessageTextInput supplies strings. The exception occurs before the empty-input and missing-filter guards as well.

Reproduction

from lfx.components.processing.filter_data_values import DataFilterComponent
from lfx.schema import Data

component = DataFilterComponent().set(
    input_data=[Data(data={"route": "CMIP"}), Data(data={"route": "OTHER"})],
    filter_key="route",
    filter_value="CMIP",
    operator="equals",
)
component.filter_data()

Observed on unchanged release-1.13.0 at bb6e7cf93b6eab2fc68c0c6dbd7914770e3ed2c6:

filter_key: str = self.filter_key.text
                  ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'text'

Expected behavior

Return the CMIP record. Accept text directly while retaining direct SDK Data/Message inputs through get_text(). Existing comparison operators and empty-input behavior should stay the same.

Operating System

Windows 11

Langflow Version

lfx/langflow-base 1.13.0 from the active release candidate branch above.

Python Version

3.12.14

Additional context

The proposed two-line production change is covered by focused component tests: 11 regressions fail on the original code and two direct SDK object controls pass. With the change, 14 tests pass; four inherited historical-version checks skip because this new test class has no version fixtures. No external services or model calls are needed. Searches for FilterDataValues, filter_data_values, and Filter Values found no existing repair for this failure. AI-assisted investigation and local validation by OpenAI Codex; no human review is claimed.

Activity

  1. ninaad-padiyarr commented on Oct 13, 2026

    @ninaad-padiyarr

    Hi! I’d like to help with this issue as a first-time contributor.

    I noticed you’ve already prepared a fix and tests. Is there any remaining implementation or test coverage I could contribute without duplicating your work?

    I’d use an AI-first approach to help write the code, then review, test, and understand it before submitting a PR. I’ll disclose the AI assistance and follow the contribution guidelines.

  2. ninaad-padiyarr commented on Oct 13, 2026

    @ninaad-padiyarr

    Hi! I’d like to help with this issue as a first-time contributor.

    I noticed you’ve already prepared a fix and tests. Is there any remaining implementation or test coverage I could contribute without duplicating your work?

    I’d use an AI-first approach to help write the code, then review, test, and understand it before submitting a PR. I’ll disclose the AI assistance and follow the contribution guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions