py2neo NameError: name 'open' is not defined

网友投稿 1448 2022-08-22

py2neo NameError: name 'open' is not defined

py2neo NameError: name 'open' is not defined

今天在使用py2neo的时候出现了下面的错误:

GraphDataUpdate.py:122: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead elapsed = (time.clock() - start)Time used: 1.196386Exception ignored in: Traceback (most recent call last): File "/Users/admin/anaconda3/lib/python3.7/site-packages/py2neo/packages/neo4j/v1/bolt.py", line 244, in __del__ File "/Users/admin/anaconda3/lib/python3.7/site-packages/py2neo/packages/neo4j/v1/bolt.py", line 358, in close File "/Users/admin/anaconda3/lib/python3.7/logging/__init__.py", line 1383, in info File "/Users/admin/anaconda3/lib/python3.7/logging/__init__.py", line 1519, in _log File "/Users/admin/anaconda3/lib/python3.7/logging/__init__.py", line 1529, in handle File "/Users/admin/anaconda3/lib/python3.7/logging/__init__.py", line 1591, in callHandlers File "/Users/admin/anaconda3/lib/python3.7/logging/__init__.py", line 905, in handle File "/Users/admin/anaconda3/lib/python3.7/logging/__init__.py", line 1131, in emit File "/Users/admin/anaconda3/lib/python3.7/logging/__init__.py", line 1121, in _openNameError: name 'open' is not defined

我的neo4j的数据库连接代码为:

graph = Graph(bolt=True,host=host,user=username,password=password)

解决方法

graph = Graph(secure=False, bolt=False,host=host,user=username,password=password)

把secure和bolt都置为false就行了哈。

参考文献

[1].py2neo bolt ProtocolError: Server closed connection. ​​https://stackoverflow.com/questions/43131325/py2neo-bolt-protocolerror-server-closed-connection​​

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:安卓下的刮刮卡摸奖的实现(刮刮卡模拟器)
下一篇:mac 2059 - Authentication plugin 'caching_sha2_password' cannot be loaded:
相关文章

 发表评论

暂时没有评论,来抢沙发吧~