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
When you perform a "Directions From 2 Point-Layers", if a route cannot be generated (start/end points cannot be found on the network), the route information is filled in with the information from the last succesful route generation.
For example, I use two files, each with 100 points. I set the start and end id fields to be a numerical id of the point in each file. When I run the process, only two of the routes can be generated, those with point ID 11 and ID 56 (due to other points being too far from the network). The resultant layer contains 89 routes, starting with a route from the points with ID 11, and then there are 45 identical routes to that one, before the one for ID 56 gets a different route, and then there are 33 identical routes to that one.
It should be the case that when a route cannot be generated, no feature is added to the layer.
The text was updated successfully, but these errors were encountered:
Seems to only happen when I am calling to a local instance of ors, when calling the public API I get the correct results with only the findable routes being present in the layer
I have done some debugging and the issue seems to lie in the common->networkaccessmenager.py. When it gets responses from a local instance, if a requests was succesful and then a subsequent one not succesful, the network manager throws an error on line 318 saying that the it cannot append a type of byte to a type of string. If you encase the self.http_call_result.content in str() then the process completes succesfully and the resulting layer has the correct amount of routes.
TypeError: can only concatenate str (not "bytes") to str
Traceback (most recent call last):
File "/Users/xxx/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/ORStools/common/networkaccessmanager.py", line 318, in replyFinished
errString = self.reply.errorString() + self.http_call_result.content
TypeError: can only concatenate str (not "bytes") to str
When you perform a "Directions From 2 Point-Layers", if a route cannot be generated (start/end points cannot be found on the network), the route information is filled in with the information from the last succesful route generation.
For example, I use two files, each with 100 points. I set the start and end id fields to be a numerical id of the point in each file. When I run the process, only two of the routes can be generated, those with point ID 11 and ID 56 (due to other points being too far from the network). The resultant layer contains 89 routes, starting with a route from the points with ID 11, and then there are 45 identical routes to that one, before the one for ID 56 gets a different route, and then there are 33 identical routes to that one.
It should be the case that when a route cannot be generated, no feature is added to the layer.
The text was updated successfully, but these errors were encountered: