Skip to content

_pickle.PicklingError: Can't pickle <neo4j.graph.Graph object at 0x7f0fc7b2c4f0> #1132

@icfly2

Description

@icfly2

Bug Report

Graph objects as returned by the driver can't be pickled. They obviously should be.

    query = "match (n)-[r]-(m) return n,r,m limit 10
    with driver.session() as session:
        g = session.run(query).graph()

    pickle.dumps(g)

_pickle.PicklingError: Can't pickle <class 'abc.total'>: attribute lookup total on abc failed

total is a node property (a float)

My Environment

Python Version: Python 3.10.13 (main, Aug 25 2023, 13:20:03) [GCC 9.4.0]
Driver Version: neo4j==5.23.1
Server Version and Edition: 4.4.29 and 5.23.0 (both enterprise)
Operating System: WSL2 ubuntu 22.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions