Repository navigation
fix(loaders): say "unsupported format" for .xls, .ods and other binary files (#1018) - #1034
Merged
yakew7 merged 1 commit intoOct 17, 2026
Conversation
…he encoding (yakew7#1018) Signed-off-by: minutechreview <141821420+minutechreview@users.noreply.github.com>
Contributor
|
@minutechreview is attempting to deploy a commit to the yashkewlani2020-gmailcom's projects Team on Vercel. A member of the Team first needs to authorize it. |
yakew7
added a commit
that referenced
this pull request
Oct 17, 2026
…th sweep Adds the fourteenth-wave changelog entries, marks the closed follow-ups done and lists the 17 new ones (#1036-#1052), adds @prami25r and @minutechreview's #1034 to the contributors file, and refreshes traction (forks 58, contributors 53, 123 issues closed this week).
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
faircode auditon an.xlsor.odsfile used to fail with a confusing message about--encodingand invalid UTF-8, because the file was read as text. It now says which format is not supported and what to do:The exit code is still 2.
In
faircode/loaders.py,read_tablenow raises aValueErrorfor.xls,.ods,.feather,.pkl,.zipand.7z, before falling back to the delimited-text reader. The check only applies when the file exists, so a missing file still reports "file not found". The suffix check ignores case (.XLStoo). Unknown text extensions such as.datare still sniffed as before.Tests are in
tests/test_loaders.py(each unsupported suffix, uppercase, missing file, unknown text extension) andtests/test_cli.py(exit code 2, the message names the format, no--encodinghint).The web UI already rejects anything that is not csv, tsv, json or xlsx, so I left the JS alone.
Type
Linked issue
Closes #1018
Checks:
pytest tests --ignore=tests/browsergives 707 passed, 41 skipped (scipy installed).ruff checkandscripts/check_em_dash.pypass.