I am trying to use the distance matrix to measure the distance between a crime (input ID) to the closest subway entrance (target layer). The problem is that sometimes the matrix comes out with results, sometimes it doesn't and instead, the algorithm fails.
I get this error in the distance matrix log
Traceback (most recent call last): File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\algs\qgis\PointDistance.py", line 123, in processAlgorithm matType, nPoints, feedback) File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\algs\qgis\PointDistance.py", line 155, in linearMatrix fields, out_wkb, source.sourceCrs()) Exception: unknown
Execution failed after 1.39 seconds
Loading resulting layers Algorithm 'Distance matrix' finished
Traceback (most recent call last): File "C:/PROGRA~1/QGIS3~1.2/apps/qgis/./python/plugins\processing\algs\qgis\PointDistance.py", line 135, in processAlgorithm matType, nPoints, feedback) File "C:/PROGRA~1/QGIS3~1.2/apps/qgis/./python/plugins\processing\algs\qgis\PointDistance.py", line 177, in linearMatrix index = QgsSpatialIndex(target_source.getFeatures(QgsFeatureRequest().setSubsetOfAttributes([]).setDestinationCrs(source.sourceCrs(), context.transformContext())), feedback) Exception: unknown Execution failed after 5.16 seconds