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

search nominatim geocode

0

I installed Nominatim locally in my machine, the serve is running perfectly. I can make requests from my browser with "http://localhost:8088/search.php?q=Example" and it returns well, but when i try to use it in a python code i have a problem, the request comes as search?q=Example and not search.php?q=Example so the serve cant complete the request.

My code:

from geopy.geocoders import Nominatim

geolocator = Nominatim(domain='localhost:8088', scheme='http')

location = geolocator.geocode('Rua Peru Indaiatuba SP')

Serve response:

[404]: GET /search?q=Rua+Peru+Indaiatuba+SP&format=json&limit=1%20-%20No%20such%20file%20or%20directory - No such file or directory

asked 14 Apr '22, 04:49

Guilherme%20Gon%C3%A7alves%20Horta's gravatar image

Guilherme Go...
11113
accept rate: 0%

edited 14 Apr '22, 05:00

How do you deploy Nominatim? Do you use Apache or nginx?

(14 Apr '22, 08:33) lonvia

Source code available on GitHub .