0

KeyError Traceback (most recent call last) in

  1 dnipro_venues = getNearbyVenues(names=dnipro_regions['Region'],

  2                                 latitudes=dnipro_regions['Latitude'],

----> 3 longitudes=dnipro_regions['Longitude']

  4                                 )


  <ipython-input-33-346ecd83d3ba> in getNearbyVenues(names, latitudes, longitudes, radius)

  4         url = 'https://api.foursquare.com/v2/venues/explore?&client_id={}&client_secret={}&
    v={}&ll={},{}&radius={}&limit={}'.format(

  5         CLIENT_ID, CLIENT_SECRET, VERSION, lat, lng, 3000, 200)

----> 6 results = requests.get(url).json()["response"]['group'][0]['items']

  7         venues_list.extend([

KeyError: 'group'

  • 1
    Try reformatting you code. If you want to highlight lines in your code, try: https://meta.stackoverflow.com/questions/294592/highlight-line-of-code – Serbitar Apr 03 '20 at 06:59
  • are you saying you cant understand the error code i pasted? – folusho sanni Apr 03 '20 at 08:02
  • Please write a proper title, and add your question, including what you've tried to do to fix it, and where does that error actually come. – James Z Apr 03 '20 at 08:07
  • This might be a bug in geopy. If you can reliably reproduce it, could you please open an issue at https://github.com/geopy/geopy/issues with complete instructions for reproduction? – KostyaEsmukov Apr 26 '20 at 08:57

0 Answers0