book icon indicating copy to clipboard operation
book copied to clipboard

Failed to invoke procedure `gds.alpha.shortestPath.astar.stream`: Caused by: java.lang.NullPointerException

Open itaybraha opened this issue 4 years ago • 3 comments

When submitting the query for A* shortest path on page 59, I get a NullPointerException.

MATCH (source:Place {id: "Den Haag"}), (destination:Place {id: "London"})
CALL gds.alpha.shortestPath.astar.stream({
    startNode: source,
    endNode: destination,
    nodeProjection: "*",
    relationshipProjection: {
        all: {
            type: "*",
            properties: "distance",
            orientation: "UNDIRECTED"
        }
    },
    relationshipWeightProperty: "distance",
    propertyKeyLat: "latitude",
    propertyKeyLon: "longitude"
})
YIELD nodeId, cost
RETURN gds.util.asNode(nodeId).id AS place, cost;

itaybraha avatar Sep 08 '20 11:09 itaybraha

The same here

abonec avatar Jan 09 '21 18:01 abonec

Is the problem solved? How to fix it

suxizhi avatar Jun 08 '21 04:06 suxizhi

Have the same problem. It appear only if a path is found. If I change start or end by an nonexistent entry, there is no error (but no result for sure !)

xNiux avatar Dec 23 '21 09:12 xNiux