You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After using geocoder.osm for a few hundred queries, I get the same error over and over from geocoder:
ERROR - HTTPSConnectionPool(host='nominatim.openstreetmap.org', port=443): Max retries exceeded with url: /sea
rch?q=NYC&format=jsonv2&addressdetails=1&limit=1 (Caused by SSLError(OSError(24, 'Too many open files')))
I don't think that the problem is on my end. It seems like a weird version of rate limiting. I added a sleep function for 5 seconds between queries but that didn't change anything. How to fix this error?
The text was updated successfully, but these errors were encountered:
It is by design, since it can reuse a session created elsewhere. Even though I would expect it to close itself the session it creates on its own or at least clearly document this in the docs (the section “Using a Session” has no mention of the fact that Geocoder will create a session if one is not provided in the kwargs).
The solution is to explicitly close the session after you’ve retrieved the results:
result = geocoder.osm( ... )
result.session.close()
After using
geocoder.osm
for a few hundred queries, I get the same error over and over fromgeocoder
:I don't think that the problem is on my end. It seems like a weird version of rate limiting. I added a sleep function for 5 seconds between queries but that didn't change anything. How to fix this error?
The text was updated successfully, but these errors were encountered: