Skip to content

Exception ignored in: <function Driver.__del__ at 0x7ff101714d30> #1024

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

Closed
mfreeman451 opened this issue Feb 28, 2024 · 5 comments
Closed

Exception ignored in: <function Driver.__del__ at 0x7ff101714d30> #1024

mfreeman451 opened this issue Feb 28, 2024 · 5 comments

Comments

@mfreeman451
Copy link

Bug Report

Trying to perform a vector search in neo4j python SDK 5.17.0 and along with some results being returned, I get an exception that I can't catch.

Code: https://paste.lol/mfreeman451/neo4j-error

Error:

% time python3 llm_querier.py
here is bob
yeah, bob
i would tend to agree, bob
sup bob
Exception ignored in: <function Driver.__del__ at 0x7ff101714d30>
Traceback (most recent call last):
  File "/home/mfreeman/venv/lib/python3.10/site-packages/neo4j/_sync/driver.py", line 489, in __del__
  File "/home/mfreeman/venv/lib/python3.10/site-packages/neo4j/_meta.py", line 229, in unclosed_resource_warn
TypeError: 'NoneType' object is not callable
python3 llm_querier.py  5.24s user 2.24s system 147% cpu 5.086 total

My Environment

Python Version: Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
Driver Version: Version: 5.17.0
Server Version and Edition: Neo4J 5.17 - Enterprise
Operating System: Ubuntu 22.04

@mfreeman451
Copy link
Author

fixed with threadr_chat_vector._driver.close() -- didn't see that in any documentations or examples..

@robsdedude
Copy link
Member

Hello and thanks for reaching out.
Great to hear you managed to figure out that you need to close the driver.

It is actually documented: https://neo4j.com/docs/api/python-driver/current/api.html#neo4j.GraphDatabase The first 2 examples of using the driver in the API docs show how to either close it using a call to .close(), or better yet, how to use the driver as a context manager using the with keyword.

@mfreeman451
Copy link
Author

mfreeman451 commented Feb 29, 2024 via email

@adam-cowley
Copy link

adam-cowley commented Mar 1, 2024

Hey @mfreeman451 , which graphacademy lesson did you run into this problem on? I will get it updated ASAP

@mfreeman451
Copy link
Author

Hey @mfreeman451 , which graphacademy lesson did you run into this problem on? I will get it updated ASAP

https://graphacademy.neo4j.com/courses/llm-fundamentals/

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

No branches or pull requests

3 participants