Skip to content

python 3 return single collection of JSONs #165

Closed
@tomasonjo

Description

@tomasonjo

I have this query i am running:

from neo4j.v1 import GraphDatabase

driver = GraphDatabase.driver("bolt://localhost:7687", auth=("neo4j", "neo4j"))


session = driver.session()


result = session.run("MATCH (a)-[r]->(b) WITH collect({source: id(a),target: id(b),caption: type(r)}) AS edges RETURN edges")

for record in result:
    print(record["edges"])

Now this works fine on my MAC, which uses python 2.7, but on my Windows Laptop, where I have Anaconda3 and python3 i get the following error:

File "C:\ProgramData\Anaconda3\lib\site-packages\neo4j\v1\api.py", line 663, i
n records
self._session.fetch()
File "C:\ProgramData\Anaconda3\lib\site-packages\neo4j\v1\api.py", line 321, i
n fetch
detail_count, _ = self._connection.fetch()
File "C:\ProgramData\Anaconda3\lib\site-packages\neo4j\bolt\connection.py", li
ne 255, in fetch
self._receive()
File "C:\ProgramData\Anaconda3\lib\site-packages\neo4j\bolt\connection.py", li
ne 284, in _receive
received = self.input_buffer.receive_message(self.socket, 8192)
File "C:\ProgramData\Anaconda3\lib\site-packages\neo4j\bolt\io.py", line 155,
in receive_message
received = self.receive(socket, n)
File "C:\ProgramData\Anaconda3\lib\site-packages\neo4j\bolt\io.py", line 139,
in receive
self._data[self._extent:new_extent] = data
BufferError: Existing exports of data: object cannot be re-sized

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions