Split Text fails with non-string metadata column labels
Problem
With a Table containing non-string metadata column labels, Split Text's default clean_output=False path raises AttributeError while reordering output columns. Pandas supports labels such as integers, tuples, and None, and the input conversion and splitting steps handle them; Table.smart_column_order() unconditionally calls .lower() / .startswith() on each label.
Reproduction
On release-1.13.0 at 6fc85ff04db6e9c8f9596fd678a9638261f50451:
from lfx.components.processing.split_text import SplitTextComponent
from lfx.schema.dataframe import DataFrame
component = SplitTextComponent()
component.set(
data_inputs=DataFrame({'text': ['alpha\nbeta'], 0: ['source-1']}),
text_key='text', separator='\n', chunk_size=6, chunk_overlap=0,
keep_separator='False', clean_output=False,
)
component.split_text()
# AttributeError: 'int' object has no attribute 'lower'Expected: two text chunks (alpha, beta) with column 0 retaining source-1 on both rows. Non-string labels should remain ordinary metadata labels, without conversion to strings. The same exception occurs when calling smart_column_order() directly.
Locally reproduced with the actual Split Text component on Windows / Python 3.12.14, Pandas 2.3.3, LFX 1.13.0. Three new regression cases fail on the original code (integer, tuple, None), while a string-label control passes.
AI assistance: investigated and prepared with OpenAI Codex; reproduction and tests were executed locally.
Source: langflow-ai/langflow