Skip to content

Crash in helpers/gmaps.py when Maps reviews data is missing (IndexError) #575

@cdt4

Description

@cdt4

Description

GHunt crashes when processing Google Maps reviews due to an unchecked index
access in helpers/gmaps.py.

Error

IndexError: list index out of range
Triggered at:
helpers/gmaps.py (reviews parsing)

Cause

The code assumes data[24] always exists, but Google Maps sometimes returns
shorter responses.

Minimal Fix

Add a bounds check before accessing data[24].

Before:

if not data[24]:
    return "private", stats, [], []

After:

if len(data) <= 24 or not data[24]:
    return "private", stats, [], []

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions