2016-04-29 128 views
1

AttributeError的:「圖表」對象有沒有屬性「暗號」蟒蛇連接器的Neo4j

這是我所得到的,當我從Neo4j的文檔網站運行示例

細節

c:\Python\Scripts>mongo-connector -m localhost:27017 -t neo4j:[email protected]:7474/ 
db/data -d neo4j_doc_manager 
Logging to mongo-connector.log. 
Exception in thread Thread-2: 
Traceback (most recent call last): 
    File "c:\python\lib\threading.py", line 914, in _bootstrap_inner 
    self.run() 
    File "c:\python\lib\site-packages\mongo_connector\util.py", line 85, in wrappe 
d 
    func(*args, **kwargs) 
    File "c:\python\lib\site-packages\mongo_connector\oplog_manager.py", line 261, 
in run 
    docman.upsert(doc, ns, timestamp) 
    File "c:\python\lib\site-packages\mongo_connector\doc_managers\neo4j_doc_manag 
er.py", line 60, in upsert 
    self.apply_id_constraint(builder.doc_types) 
    File "c:\python\lib\site-packages\mongo_connector\doc_managers\neo4j_doc_manag 
er.py", line 47, in apply_id_constraint 
    self.graph.cypher.execute(constraint) 
AttributeError: 'Graph' object has no attribute 'cypher' 
+0

你正在使用哪個版本的'py2neo'? 'pip search py2neo' –

+0

您可能正在使用版本3,現在降級到版本2.0.9 – loopasam

回答

0

在您的代碼中替換.run而不是.cypher