Skip to content

IndexError: list index out of range #1

@zmsmith

Description

@zmsmith

http://localhost:9000/examplecom/example/group/4/

Stacktrace (most recent call last):

(8 additional frame(s) were not displayed)
...
  File "geo/models.py", line 216, in find_from_request
    return cls.find_by_ip(request)
  File "geo/models.py", line 232, in find_by_ip
    city, distance = cls.objects.get_pitch_city(ip_address=ip_address)
  File "geo/managers.py", line 69, in get_pitch_city
    location_dict = GeoIP.get_data_from_ip_cache(ip_address)
  File "geo/utils.py", line 288, in get_data_from_ip_cache
    city, dist = City.objects.get_closest_city(lat, lng, active_only=True)
  File "geo/managers.py", line 91, in get_closest_city
    closest_city = cities[0]

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