osm-relatify icon indicating copy to clipboard operation
osm-relatify copied to clipboard

Bad data causes Error 500

Open donmac703 opened this issue 4 months ago • 2 comments

A bus route that consists of a single way with a role of platform_entry_only will cause 'Relation load failed - 500' Internal Server error.

donmac703 avatar Aug 16 '25 04:08 donmac703

This happens many times when loading a relation. I don't think the data matters here, because when I was trying to load a relation I had this error maybe 7 times and after the 8th time it finally loaded.

maro-21 avatar Oct 09 '25 19:10 maro-21

So it appears there are several issues causing this:

1: @donmac703 case: relatify only considers valid way members to be one of {'', 'forward', 'backward', 'route'} role.

https://github.com/Zaczero/osm-relatify/blob/ea2e6a8c035fd1bdf38bac4b06df44f20e3d5ff1/models/fetch_relation.py#L148-L152

Should this behavior be changed? I don't really remember exact reason for this. Relatify follows the PTv2 rules but maybe it's a bug here?

2: @maro-21 case: osm nad overpass desync. Because of limited OSM API filtering options, Relatify uses Overpass that lags behind a few minutes and causes odd errors when a change appears in OSM API but does not appear in Overpass.

Zaczero avatar Oct 29 '25 16:10 Zaczero