# Error when calling \`gds.graph.create.cypher\` or \`algo.dfs.stream\`

**URL:** <https://community.neo4j.com/t/error-when-calling-gds-graph-create-cypher-or-algo-dfs-stream/18977>\
**Category:** Graph Data Science / Graph Analytics\
**Created:** [May 20, 2020, 6:35pm UTC](https://community.neo4j.com/t/error-when-calling-gds-graph-create-cypher-or-algo-dfs-stream/18977 "2020-05-20T18:35:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![max.prokopenko](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/max.prokopenko/32/4592_2.png) [@max.prokopenko](https://community.neo4j.com/u/max.prokopenko)\
**Post date:** [May 20, 2020, 6:35pm UTC](https://community.neo4j.com/t/error-when-calling-gds-graph-create-cypher-or-algo-dfs-stream/18977/1 "2020-05-20T18:35:02Z")

</div>

When calling the following using `gds` 1.1 and `neo4j` 3.5.14:

```auto
CALL gds.graph.create.cypher(
    'project_name',
	'MATCH (p:Project{name:"project_name"})-[:HAS]->(s:Surface) where s.stable <> 0 return id(s) as id',
	'MATCH (p:Project{name:"project_name"})-[:HAS]->(s:Surface)-[c:CONFIDENCE]->(t:Surface) WHERE c.confidence <= 15.0 RETURN id(s) as source, id(t) as target'
)
YIELD graphName, nodeCount, relationshipCount, createMillis;

```

I get the error:

```auto
Neo.ClientError.Procedure.ProcedureCallFailed
Failed to invoke procedure `gds.graph.create.cypher`: Caused by: java.lang.IndexOutOfBoundsException: index 243

```

Also the same error for a similar call when using `algo` 3.5.14:

```auto
MATCH (p:Project {name: 'project_name'})-[:HAS_START]->(start:Surface)
CALL algo.dfs.stream(
'MATCH (p:Project{name:"project_name"})-[:HAS]->(s:Surface) where s.stable <> 0 return id(s) as id',
'MATCH (p:Project{name:"project_name"})-[:HAS]->(s:Surface)-[c:CONFIDENCE]->(t:Surface) WHERE c.confidence <= 15.0 RETURN id(s) as source, id(t) as target',
'>',
id(start),
{
  graph: 'cypher'
}
)
YIELD nodeIds

```

With the error:

```auto
Failed to invoke procedure `algo.dfs.stream`: Caused by: java.lang.IndexOutOfBoundsException: index 243

```

**What is wrong here?** Each of the `MATCH` queries works fine outside of the `algo` or `gds` call, and this calls work for some projects and not others.

---

<div class="post-metadata">

**Author:** ![nabila.abraham](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/nabila.abraham/32/9439_2.png) [@nabila.abraham](https://community.neo4j.com/u/nabila.abraham)\
**Post date:** [June 3, 2020, 2:37am UTC](https://community.neo4j.com/t/error-when-calling-gds-graph-create-cypher-or-algo-dfs-stream/18977/2 "2020-06-03T02:37:13Z")

</div>

hi @max.prokopenko, did you figure this out? I have the same issue

---

<div class="post-metadata">

**Author:** ![max.prokopenko](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/max.prokopenko/32/4592_2.png) [@max.prokopenko](https://community.neo4j.com/u/max.prokopenko)\
**Post date:** [June 4, 2020, 2:18pm UTC](https://community.neo4j.com/t/error-when-calling-gds-graph-create-cypher-or-algo-dfs-stream/18977/3 "2020-06-04T14:18:17Z")

</div>

Hello @nabila.abraham, no I still have this issue, just working around it and hoping I don't see it again at the moment

---

<div class="post-metadata">

**Author:** ![cookie](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/cookie/32/4308_2.png) [@cookie](https://community.neo4j.com/u/cookie)\
**Post date:** [August 5, 2021, 2:50pm UTC](https://community.neo4j.com/t/error-when-calling-gds-graph-create-cypher-or-algo-dfs-stream/18977/4 "2021-08-05T14:50:21Z")

</div>

I have exactly the same issue. Any ideas?

---

<div class="post-metadata">

**Author:** ![alicia\_frame1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/alicia_frame1/32/6998_2.png) [@alicia\_frame1](https://community.neo4j.com/u/alicia_frame1)\
**Post date:** [August 8, 2021, 3:08pm UTC](https://community.neo4j.com/t/error-when-calling-gds-graph-create-cypher-or-algo-dfs-stream/18977/5 "2021-08-08T15:08:01Z")

</div>

The easiest fix is to upgrade to Neo4j 4.3 (or anything in the 4.x series) and use the 1.6 version of the library.

If you're still running into this bug, and you can't upgrade from Neo4j 3.5, please test it with GDS 1.1.6 (the newest GDS 1.1 series patch).

The algos library, fwiw, is deprecated and no longer supported.
