python-google-places: "ValueError: lat_lng must be a dict with keys, 'lat' and 'lng'" when using location parameter
My call to google places API passes in a keyword and a city, state (i.e. San Antonio, TX). It was working and all of the sudden started failing with ValueError: lat_lng must be a dict with keys, 'lat' and 'lng'. However, in the init.py file, this should only occur if it can’t geocode the location. I’ve tried with different locations but now get the same error. Any idea what would have caused it? I haven’t hit my API limits.
About this issue
- Original URL
- State: open
- Created 8 years ago
- Comments: 29 (5 by maintainers)
Commits related to this issue
- Fix the use of mutable default arguments Per issue #59 and #82, we should not be using mutable default arguments. This change properly handles arguments that need to default to mutable values. — committed to beamerblvd/python-google-places by beamerblvd 8 years ago
- Fix the use of mutable default arguments Per issue #59 and #82, we should not be using mutable default arguments. This change properly handles arguments that need to default to mutable values. — committed to beamerblvd/python-google-places by beamerblvd 8 years ago
Same issue occurred for me. The problem is that you have to enable the Geocoding API here https://developers.google.com/maps/documentation/geocoding/start you don’t have to get another api key for geocoding api. Just enable in the same project as the places api.
Fix in https://github.com/slimkrazy/python-google-places/pull/100