stops creator overpass to many connections
Closed this issue · 3 comments
When building a stops list i\m getting the following error:
Traceback (most recent call last):
File "osm2gtfs.py", line 101, in
main()
File "osm2gtfs.py", line 67, in main
stops_creator.add_stops_to_schedule(schedule, data)
File "C:\Projecten\osm2gtfs\creators\stops_creator.py", line 20, in add_stops_to_schedule
stops = data.get_stops()
File "C:\Projecten\osm2gtfs\core\osm_connector.py", line 239, in get_stops
self._get_names_for_unnamed_stops()
File "C:\Projecten\osm2gtfs\core\osm_connector.py", line 488, in _get_names_for_unnamed_stops
self._find_best_name_for_unnamed_stop(stop)
File "C:\Projecten\osm2gtfs\core\osm_connector.py", line 518, in find_best_name_for_unnamed_stop
""" % (stop.lat, stop.lon, stop.lat, stop.lon))
File "C:\Python27\lib\site-packages\overpy_init.py", line 123, in query
raise exception.OverpassTooManyRequests
overpy.exception.OverpassTooManyRequests: Too many requests
or
Traceback (most recent call last):
File "osm2gtfs.py", line 101, in
main()
File "osm2gtfs.py", line 67, in main
stops_creator.add_stops_to_schedule(schedule, data)
File "C:\Projecten\osm2gtfs\creators\stops_creator.py", line 20, in add_stops_to_schedule
stops = data.get_stops()
File "C:\Projecten\osm2gtfs\core\osm_connector.py", line 211, in get_stops
self._get_names_for_unnamed_stops()
File "C:\Projecten\osm2gtfs\core\osm_connector.py", line 488, in _get_names_for_unnamed_stops
self._find_best_name_for_unnamed_stop(stop)
File "C:\Projecten\osm2gtfs\core\osm_connector.py", line 545, in find_best_name_for_unnamed_stop
candidate.get_nodes(resolve_missing=True))
File "C:\Python27\lib\site-packages\overpy_init.py", line 860, in get_nodes
tmp_result = self.result.api.query(query)
File "C:\Python27\lib\site-packages\overpy_init.py", line 126, in query
raise exception.OverpassGatewayTimeout
overpy.exception.OverpassGatewayTimeout: Server load too high
Is there a way to avoid it?
You could use a different API server: http://wiki.openstreetmap.org/wiki/Overpass_API
Or if you have many stops without names in OSM, you could set name_auto
to no
in your config file.
where can i configure a different server? is this configurable?
You need to ask the people from the overpy library or look into their source. Their API URL is defined here.