This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

GeocoderServiceError Geopy Nominatim in Local Server

0

I did my own OpenStreetMap local server(to avoid the online limits) with Nominatim and it's working ok through the webpage(localhost/nominatim). But when I try to collect geocodes (same that works well on the webpage) and after some number of requests the server shows this error:

Traceback (most recent call last):

  File "<ipython-input-65-1a4379f0657b>", line 4, in <module>
    print (nom.geocode(row['location']))

  File "/Users/murianribeiro/anaconda3/lib/python3.6/site-packages/geopy/geocoders/osm.py", line 236, in geocode
    self._call_geocoder(url, timeout=timeout), exactly_one

  File "/Users/murianribeiro/anaconda3/lib/python3.6/site-packages/geopy/geocoders/base.py", line 288, in _call_geocoder
    raise GeocoderServiceError(message)

GeocoderServiceError: HTTP Error 500: Internal Server Error

I tried to put timeout in my code, but I am still facing the same problem.

My actual code is more or less like this:

from geopy.geocoders import Nominatim
nom = Nominatim(domain='192.168.1.214/nominatim', scheme='http', timeout=3) #tried with different timeouts
df1["Coordinates"]=df1["location"].apply(nom.geocode)

Someone know how to solve this?

Thanks ;)

asked 02 Jul '18, 23:07

MurianRibeiro's gravatar image

MurianRibeiro
11112
accept rate: 0%

Internal Server Error doesn't look python related. On your server check the logfile, likely /var/log/apache2/error.log

(02 Jul '18, 23:27) mtmail