A binary file with an unknown extension is profiled as CSV text and exits 0
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start in faircode/loaders.py at read_table(), in the sniffing fallback for unrecognised suffixes, and confirm that a NUL-containing file is decoded leniently today. Then check faircode/cli.py to see how the exit code is set, and add a reject path that raises with "looks like a binary file, not a table". Tests go in tests/test_loaders.py: a tab-separated .dat must still load, and a .feather stub containing NUL bytes must be rejected with a non-zero exit.
Written by the indexing model from the issue text.
Description
Where: faircode/loaders.py read_table() (the sniffing fallback for an unrecognised suffix), faircode/cli.py, tests/test_loaders.py.
Current gap: the fallback exists so a tab-separated export saved as .dat still works. But a file whose bytes are not text at all (a .feather, .pkl, .sav) is decoded leniently and profiled as a one-column "dataset" with the report and exit code 0, so a wrong file in a CI step passes. This is different from the .xls message issue: here nothing fails.
Repro:
$ printf 'ARROW1\0\0junk' > a.feather
$ python3 -m faircode profile a.feather; echo "exit=$?"
... FAIR CODE - DATASET REPRESENTATION PROFILE ... # no error
exit=0
Suggested approach: for the sniffing fallback, reject content with NUL bytes (or a high share of non-text bytes) with "looks like a binary file, not a table", and test a .dat TSV (still accepted) next to a .feather stub (rejected).
- Dominant language
- HTML
- Stars
- 47
- Forks
- 45
- Avg merge
- 2h 49m
- Merged PRs (30d)
- 61
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from yakew7/Fair-Code
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug documentation good first issue
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Numeric column headers keep their type in Python (the integer 2020) and are text in the web engineOpenbug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
All issues in yakew7/Fair-Code
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
anomalyco/opencode#56380 · 1 comment ·
Maintainers usually reply within 1 day
-
Add PhotocraftOpenenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:session-state issue-rating: 🦞 diamond lobster no-stale P2
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
openclaw/wacli#503 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 81/100
apache/rocketmq-dashboard#6895 ·
Maintainers usually reply within 3 days
-
The --output=json `output` array drops the last console line when it is empty: console.log("a"); console.log("") gives ["a"]Possibly taken A pull request linked to this issue is open or already merged. Openbug runtime
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
frostney/GocciaScript#1741 ·
Maintainers usually reply within 1 day