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
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×599
×4

question asked: 02 Jul '18, 23:07

question was seen: 3,380 times

last updated: 02 Jul '18, 23:27

powered by OSQA