The routes in question are commented out (i.e. <!--    <vehicle
arrivalPos="-1" depart="18" departLane="best" departPos="0"
id="Nigrisoli_92_3" type="private"><route edges="b65 b67 b32 b16[1] b18
b20+19b b2[1][1][1]b "/></vehicle> -->) but the parse_fast function does
not handle xml comments (it's a fast parser for large and simple files).
For most cases you can use sumolib.xml.parse which handles this correctly.

regards,
Jakob

Am Mi., 28. Apr. 2021 um 11:08 Uhr schrieb <eclipse.ep...@spamgourmet.com>:

> Hello,
>
> I am working with the Bologna scenario from
> https://github.com/DLR-TS/sumo-scenarios/tree/master/bologna. I use the
> python library sumolib.
>
> Could it be possible that an edge in the route file doesn't exist in the
> network? I'm running into this problem:
> ```
> net = load_network('joined_buslanes.net.xml')
> for route in sumolib.output.parse_fast('joined.rou.xml', 'route',
> ['edges']):
>       for edge in route.edges.split():
>               net.getEdge(edge)
> KeyError: 'b32'
> ```
>
> 18 out of the 11079 routes contain the edge 'b32', which can't be found
> in the network.
>
> For what I'm trying to do I can just discard the 18 routes but it makes
> me wonder if I did anything wrong or if there is a inconsistency in the
> files.
>
> Have a good day,
> --
> Antoine Huchet
>
> _______________________________________________
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
_______________________________________________
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to