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

A JSON dataset with nested objects crashes the CLI with a raw traceback

Closed Beginner friendly
#844 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #853 by @Tiyatrotist — merged

Assessment

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

Research direction

Start with the JSON path in faircode/loaders.py and the failing profiling path in faircode/profiler.py; reproduce using the nested JSON example and python3 -m faircode profile nested.json. Add a CLI test covering the input and expected behavior: either flatten loc into loc.state or exit with a clear one-line error instead of a traceback.

Written by the indexing model from the issue text.

Description

bug good first issue

Where: faircode/loaders.py JSON path, faircode/profiler.py.

Current gap: A records-style JSON file whose values are objects makes pandas produce dict cells, and profiling dies in unique() with TypeError: unhashable type: 'dict' and a full traceback - unlike every other bad-input path, which exits 2 with a one-line error:. The web engine handles the same file.

Repro:

$ echo '[{"sex":"M","loc":{"state":"TX"}},{"sex":"F","loc":{"state":"CA"}}]' > nested.json
$ python3 -m faircode profile nested.json
Traceback (most recent call last): ... TypeError: unhashable type: 'dict'

Suggested approach: flatten with pandas.json_normalize (loc.state, matching what a user expects) or reject with a clear error; add a CLI test.

Dominant language
HTML
Stars
47
Forks
45
Avg merge
2h 47m
Merged PRs (30d)
85

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.