Skip to content

Commit

Permalink
Update osm.py / Function fix for nominatim request headers error
Browse files Browse the repository at this point in the history
  • Loading branch information
vertigo-red authored Sep 11, 2024
1 parent 39b9999 commit 0d4596b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions geocoder/osm.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,12 @@ class OsmQuery(MultipleResultsQuery):
_RESULT_CLASS = OsmResult
_KEY_MANDATORY = False

def _build_headers(self, provider_key, **kwargs): # Fix function for nominatim request headers error
"""Will be overridden according to the targetted web service"""

return {"User-Agent": 'My User Agent 1.0'}


def _build_params(self, location, provider_key, **kwargs):
# backward compatitibility for 'limit' (now maxRows)
if 'limit' in kwargs:
Expand Down

0 comments on commit 0d4596b

Please sign in to comment.