Describe the bug
GHunt authenticates successfully and loads the stored session correctly, but crashes during the email lookup phase with a KeyError: 'container'.
The issue appears to originate from the People API response parsing logic in people.py, likely due to a schema change in Google's response structure.
To Reproduce
- Install GHunt 2.3.4
- Authenticate successfully using OAuth token
- Run:
ghunt email target@gmail.com
- Observe crash
Expected behavior
GHunt should complete the email lookup process without crashing, even if certain metadata fields are missing from the API response.
Ideally, missing fields should be handled gracefully using fallback checks instead of direct dictionary key access.
Actual Error
Traceback (most recent call last):
File "/home/sopnic2/.local/bin/ghunt", line 6, in <module>
sys.exit(main())
...
File "/home/sopnic2/.local/share/pipx/venvs/ghunt/lib/python3.13/site-packages/ghunt/parsers/people.py", line 164, in _scrape
self.coverPhotos[cover_photo_data["metadata"]["container"]] = person_cover_photo
KeyError: 'container'
System Information
- OS: Arch Linux
- Python Version: 3.13
- GHunt Version: 2.3.4
Additional context
Authentication works correctly:
- Stored session loads successfully
- OAuth token is accepted
- Google API requests appear to work
The crash only happens during parsing of People API response data.
Possible problematic line:
cover_photo_data["metadata"]["container"]
Suggested safer handling:
container = cover_photo_data.get("metadata", {}).get("container", "unknown")
This may be related to recent Google API response schema changes or incompatibility with Python 3.13.

Describe the bug
GHunt authenticates successfully and loads the stored session correctly, but crashes during the email lookup phase with a
KeyError: 'container'.The issue appears to originate from the People API response parsing logic in
people.py, likely due to a schema change in Google's response structure.To Reproduce
Expected behavior
GHunt should complete the email lookup process without crashing, even if certain metadata fields are missing from the API response.
Ideally, missing fields should be handled gracefully using fallback checks instead of direct dictionary key access.
Actual Error
System Information
Additional context
Authentication works correctly:
The crash only happens during parsing of People API response data.
Possible problematic line:
Suggested safer handling:
This may be related to recent Google API response schema changes or incompatibility with Python 3.13.