Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

A binary file with an unknown extension is profiled as CSV text and exits 0

Closed Beginner friendly
#1,019 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
cli

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

bug good first issue

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from yakew7/Fair-Code

All issues in yakew7/Fair-Code

Similar issues

More CLI issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.