Dec-02-2017, 11:41 AM
I have a list with addresses in the csv file. I would like to get coordinates for this whole list. Unfortunately, I'm getting an error:
Traceback (most recent call last):
File "<ipython-input-375-e8f87c93126d>", line 8, in <module>
print(location.address)
AttributeError: 'NoneType' object has no attribute 'address'I do not know what is wrong. When I enter instead of and a specific address from my list, the loop works correctly.from geopy.geocoders import Nominatim
for i in adres:
geolocator = Nominatim()
location = geolocator.geocode(i)
time.sleep(.45)
print(location.address)
print((location.latitude, location.longitude))This is a part of my list:print(adres) ['Ul. Sądowa 8 74-320 Barlinek', 'Ul. Armii Polskiej 36 73-260 Pełczyce'}]Can anyone tell me what is wrong?
