question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrading to version 3.3.0 causes a KeyError on initialising connection to neo4j DB

See original GitHub issue

We have a neo4j instance, populated with the help of neomodel v3.2.9. The v3.3.0 of neomodel breaks when attempting to initialise the connection to the database:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/neomodel/util.py", line 150, in _object_resolution
    resolved_object = self._NODE_CLASS_REGISTRY[frozenset(a_result_attribute[1].labels)].inflate(
KeyError: frozenset({'Person'})

This appears to be as a result of the self._NODE_CLASS_REGISTRY changes included in v3.3.0, which appear to be breaking. Is this a known issue? Given that this is a minor version bump, we would not expect breaking changes to be included.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:78 (18 by maintainers)

github_iconTop GitHub Comments

4reactions
jonadalycommented, Feb 5, 2019

@aanastasiou The changes appears to work:

  • I populated a flask+neo4j app with some data using neomodel 3.2.9
  • Using neomodel 3.2.9, I was able to POST additional entities successfully
  • Using neomodel 3.3.0, I was unable to POST additional entities as described in this issue
  • Using the version in the branch specified above, I was able to post entities successfully

Subsequent switching between the versions has the behaviour you would expect (3.2.9 and the above branch work; 3.3.0 results in the node registry problems).

3reactions
aanastasioucommented, Jan 28, 2019

@jonadaly @manoadamro @theterg @mzgajner @mostafa @mjmare @MardanovTimur @phoebebright @robertlagrant @robinedwards @jberends @oikonomou

Can I please ask you guys to give it a go and test this branch?

It incorporates a number of pull requests the most important of which for this issue is the one by @oikonomou that so far seems to have solved this issue:

  • It works with this Flask test-case (main_naive.py);
  • It works with this very simple Django test case
    • @mostafa, there is a tiny little bit of configuration you need to do so that the Django app gets to connect successfully to your server; and
  • It also seems to work in a very brief multithreaded test I run over a tiny little cluster to test explicit transactions.

@mjmare, @robertlagrant talked about Pylons / Pyramid before so it would be nice to hear from you if it works there too, although, I do not see why it should not.

Looking forward to hearing from you

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Neo4j] KeyError in python - Google Groups
I'm using python embedded in order to classify all the nodes in a neo4j ... the work at 4 am It only reads...
Read more >
Upgrading to version 3.3.0 causes a KeyError on initialising ...
Upgrading to version 3.3.0 causes a KeyError on initialising connection to neo4j DB #378. We have a neo4j instance, populated with the help...
Read more >
CherryPy Documentation - Read the Docs
Built on CherryPy 3.3.0 and Python 2.7.3 with Jinja 2.7.2 and ... Now let's update the HTML code so that we link to...
Read more >
Diff - tinkerpop - Google Git
As of TinkerPop 3.3.0, there is now a new version of Gryo in 3.0 that is only ... The link:https://github.com/apache/tinkerpop/blob/x.y.z/gremlin-core/src/ ...
Read more >
Search Results - CVE
CVE-2022-43516, A Firewall Rule which allows all incoming TCP connections to ... attackers can cause a type to be incorrectly initialized in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found