生成知识图谱.py
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/init.py", line 806, in acquire
cx = self._free_list.popleft()
^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/errors.py", line 54, in split_code
parts = code.split(".")
^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'split'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jiazhu/Downloads/simple_RAG_with_LLMs_API-main/neo4j/生成知识图谱.py", line 6, in
graph = Graph("http://localhost:7474/browser/", auth=('neo4j', 'neo4j'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/database.py", line 288, in init
self.service = GraphService(profile, settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/database.py", line 119, in init
self._connector = Connector(profile, connector_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/init.py", line 960, in init
self._add_pools(*self._initial_routers)
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/init.py", line 982, in _addpools
pool = ConnectionPool.open(
^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/init.py", line 649, in open
seeds = [pool.acquire() for in range(init_size or cls.default_init_size)]
^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/init.py", line 813, in acquire
cx = self._connect()
^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/init.py", line 764, in _connect
cx = Connection.open(self.profile, user_agent=self.user_agent,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/init.py", line 178, in open
return HTTP.open(profile, user_agent=user_agent,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/http.py", line 63, in open
http._hello(user_agent or http_user_agent())
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/http.py", line 162, in hello
rs.audit()
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/http.py", line 479, in audit
failure = Neo4jError.hydrate(self.errors().pop(0))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/errors.py", line 46, in hydrate
return cls(message, code)
^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/errors.py", line 64, in new
classification, , _ = cls.split_code(code)
^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/errors.py", line 56, in split_code
raise ValueError(code)
ValueError: None
你好,我在运行生成知识图谱.py时出错,错误如下:请问如何解决?
生成知识图谱.py Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/init.py", line 806, in acquire cx = self._free_list.popleft() ^^^^^^^^^^^^^^^^^^^^^^^^^ IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/errors.py", line 54, in split_code parts = code.split(".") ^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'split'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/jiazhu/Downloads/simple_RAG_with_LLMs_API-main/neo4j/生成知识图谱.py", line 6, in
graph = Graph("http://localhost:7474/browser/", auth=('neo4j', 'neo4j'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/database.py", line 288, in init
self.service = GraphService(profile, settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/database.py", line 119, in init
self._connector = Connector(profile, connector_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/init.py", line 960, in init
self._add_pools(*self._initial_routers)
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/init.py", line 982, in _addpools
pool = ConnectionPool.open(
^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/init.py", line 649, in open
seeds = [pool.acquire() for in range(init_size or cls.default_init_size)]
^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/init.py", line 813, in acquire
cx = self._connect()
^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/init.py", line 764, in _connect
cx = Connection.open(self.profile, user_agent=self.user_agent,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/init.py", line 178, in open
return HTTP.open(profile, user_agent=user_agent,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/http.py", line 63, in open
http._hello(user_agent or http_user_agent())
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/http.py", line 162, in hello
rs.audit()
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/client/http.py", line 479, in audit
failure = Neo4jError.hydrate(self.errors().pop(0))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/errors.py", line 46, in hydrate
return cls(message, code)
^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/errors.py", line 64, in new
classification, , _ = cls.split_code(code)
^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py2neo/errors.py", line 56, in split_code
raise ValueError(code)
ValueError: None