Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph commit transactions issue on 2021.1.2 #903

Closed
aguinaldoabbj opened this issue May 31, 2021 · 2 comments
Closed

Graph commit transactions issue on 2021.1.2 #903

aguinaldoabbj opened this issue May 31, 2021 · 2 comments
Labels

Comments

@aguinaldoabbj
Copy link

aguinaldoabbj commented May 31, 2021

Hello all,

I'm getting this error

/opt/conda/lib/python3.9/site-packages/py2neo/data/__init__.py in __db_merge__(self, tx, primary_label, primary_key)
    299         for (pl, pk, labels), nodes in node_dict.items():
    300             if pl is None or pk is None:
--> 301                 raise ValueError("Primary label and primary key are required for MERGE operation")
    302             pq = unwind_merge_nodes_query(map(dict, nodes), (pl, pk), labels)
    303             pq = cypher_join(pq, "RETURN id(_)")

ValueError: Primary label and primary key are required for MERGE operation

when I'm trying to commit a subgraph with 2021.1.2. I'm using the very same piece of code that used to work until version 2021.1.1:

for p in subgraphs:
    tx = graph.begin()
    tx.merge(p)
    graph.commit(tx)

Primary label and key were as always defined when I created a Node Object. Same corde works on 2021.1.1.

@aguinaldoabbj aguinaldoabbj changed the title Graph commit transactions issue on Graph commit transactions issue on 2021.1.2 May 31, 2021
@technige
Copy link
Contributor

Can you share a typical value for p?

@technige technige added the bug label Jun 1, 2021
@technige
Copy link
Contributor

technige commented Jun 1, 2021

And fixed in release 2021.1.3
https://pypi.org/project/py2neo/2021.1.3/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants