Error "ConnectionRefusedError: [Errno 111] Connection refused"

Hi! We are students and we are doing a Python project with the processing of a large dataset, turning the names of places into coordinates and placing markers on the map. To do this, we use Folium, namely the Nominatim module.

The previous days we had no problems accessing the server at https://nominatim.openstreetmap.org . But last night (May 17, 2023), the server stopped responding and the error “ConnectionRefusedError: [Errno 111] Connection refused” started to occur when the code was running. We tried changing the ip address via vpn, it helped a couple of times, we were able to process the test dataset, but after a while it stopped working.

Can you tell us what the problem is? We have a deadline tomorrow :(((

Maybe because of this?
https://operations.osmfoundation.org/policies/nominatim/

2 Likes

As @RicoElectrico says this will be because you are not complying with the usage policy and are getting blocked as a result.

The IP block is only applied after you have received a number of error responses and have continued making calls so you probably need to pay better attention to the response codes you get from your API calls.

The correct response to getting blocked is not to keep changing your IP address, it is to make your use of the service comply with the policy.

7 Likes