title: Py2neo IndexError: index out of range on Graph.run with gds.alpha.allShortestPaths.stream
body: <p>I'm try to run <code>gds.alpha.allShortestPaths.stream</code> in a <code>py2neo.Graph</code> instance</p>
  <p>That is my code:</p>
  <pre class="lang-py prettyprint-override"><code>cypherCode = &quot;&quot;&quot;CALL gds.alpha.allShortestPaths.stream({
  nodeQuery: 'MATCH (n:AUTHOR) RETURN id(n) AS id',
  relationshipQuery: 'MATCH (n:AUTHOR)-[r:COAUTHORS]-(p:AUTHOR) RETURN id(n) AS source, id(p) AS target'
  })
  YIELD sourceNodeId, targetNodeId, distance
  return sourceNodeId, targetNodeId, distance
  &quot;&quot;&quot;
  r = graph.run(cypherCode)
  </code></pre>
  <p>I'm using <code>relationshipQuery: 'MATCH (n:AUTHOR)-[r:COAUTHORS]-(p:AUTHOR) RETURN id(n) AS source, id(p) AS target'</code> becouse I need undirected paths.</p>
  <p>After 60sec I get this error:</p>
  <pre><code>IndexError: index out of range
  ---------------------------------------------------------------------------
  IndexError                                Traceback (most recent call last)
  &lt;timed exec&gt; in &lt;module&gt;
  
  ~/.local/lib/python3.8/site-packages/py2neo/database.py in run(self, cypher, parameters, **kwparameters)
      403         :return:
      404         &quot;&quot;&quot;
  --&gt; 405         return self.auto().run(cypher, parameters, **kwparameters)
      406 
      407     def evaluate(self, cypher, parameters=None, **kwparameters):
  
  ~/.local/lib/python3.8/site-packages/py2neo/database.py in run(self, cypher, parameters, **kwparameters)
      976                 result = self._connector.run(self.ref, cypher, parameters)
      977             else:
  --&gt; 978                 result = self._connector.auto_run(cypher, parameters,
      979                                                   graph_name=self.graph.name,
      980                                                   readonly=self.readonly)
  
  ~/.local/lib/python3.8/site-packages/py2neo/client/__init__.py in auto_run(self, cypher, parameters, pull, graph_name, readonly)
     1341             if pull != 0:
     1342                 try:
  -&gt; 1343                     cx.pull(result, n=pull)
     1344                 except TypeError:
     1345                     # If the RUN fails, so will the PULL, due to
  
  ~/.local/lib/python3.8/site-packages/py2neo/client/bolt.py in pull(self, result, n, capacity)
      941         result.append(response, final=(n == -1))
      942         try:
  --&gt; 943             self._sync(response)
      944         except BrokenWireError as error:
      945             result.transaction.mark_broken()
  
  ~/.local/lib/python3.8/site-packages/py2neo/client/bolt.py in _sync(self, *responses)
      745         self.send()
      746         for response in responses:
  --&gt; 747             self._wait(response)
      748 
      749     def _audit(self, task):
  
  ~/.local/lib/python3.8/site-packages/py2neo/client/bolt.py in _wait(self, response)
      740         &quot;&quot;&quot;
      741         while not response.full() and not response.done():
  --&gt; 742             self._fetch()
      743 
      744     def _sync(self, *responses):
  
  ~/.local/lib/python3.8/site-packages/py2neo/client/bolt.py in _fetch(self)
      715         failed state into an exception.
      716         &quot;&quot;&quot;
  --&gt; 717         tag, fields = self.read_message()
      718         if tag == 0x70:
      719             self._responses.popleft().set_success(**fields[0])
  
  ~/.local/lib/python3.8/site-packages/py2neo/client/bolt.py in read_message(self)
      642 
      643     def read_message(self):
  --&gt; 644         tag, fields = self._reader.read_message()
      645         if tag == 0x71:
      646             # If a RECORD is received, check for more records
  
  ~/.local/lib/python3.8/site-packages/py2neo/client/bolt.py in read_message(self)
       94                 chunks.append(self.wire.read(size))
       95         message = b&quot;&quot;.join(chunks)
  ---&gt; 96         _, n = divmod(message[0], 0x10)
       97         try:
       98             unpacker = UnpackStream(message, offset=2)
  
  IndexError: index out of range
  </code></pre>
  <p>When I try to change the <code>relationshipQuery</code> with oriented path or with an small graph it's works fine.</p>
  <p>Running this cypher code directly on neo4j browser it's works and  takes about 80sec to run.</p>
  <p>My graph have 10k nodes and 20k relations.</p>