Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1878.
Some XLSX exporters put a non-date value such as
ASUSindocProps/core.xml'sdcterms:created. The workbook's cells can be perfectly readable, but openpyxl rejects the entire document while reading properties, before knowledge extraction can reach the worksheets.Use a per-call
ExcelReadersubclass that validates this one field with openpyxl's ownDocumentPropertiesdate validator. If it raisesValueError, remove only that creation element from the in-memory properties XML and log a warning. All remaining metadata, styles and worksheet parsing still use openpyxl's normal path.read_only=True/data_only=Trueoptions remain unchanged.The issue is filed as a compatibility request; this implements its selective creation-metadata tolerance, rather than treating arbitrary malformed workbooks as valid.
Issue / existing PR checks
read_properties; no existing fix found.develop@99e479a6b45ecf6f13a1abf32db4f2b5787240e8.Verification
Windows / Python 3.12 / frozen
uv.lock(openpyxl 3.1.5):Before fix: both XLSX and XLSM synthetic workbook tests fail with
could not read propertiesafter changing only the creation timestamp toASUS. The damaged-sheet control also fails at properties before reaching the intended worksheet error.After fix:
uv run --no-sync python -m pytest tests/unit/knowledge/test_parse.py -q— 17 passed. New regressions cover XLSX and XLSM cell extraction, unchanged original source bytes, damaged worksheet rejection and rejection of an independently invalidmodifiedtimestamp.Focused Ruff check/format and mypy — passed.
Local Codex CLI static review of the patch, full parser/tests and installed openpyxl reader/core implementation — completed with no actionable findings. Tests were run separately.
make all RUN="uv run --no-sync python -m" PYTEST_JOBS=8(ASCII path overrides for this Windows checkout) — passed: format/lint, mypy, and 4607 passed / 209 skipped backend tests.Normal Git pre-commit hook (not bypassed) — passed: format/lint/mypy, 24 passed affected tests, and TypeScript + Vite/PWA production build.
Remote CI is separate from local verification; no LLM or business document was used.
Target branch
develop