Mongo连接器与neo4j无法正常工作

时间:2016-05-23 14:30:47

标签: mongodb neo4j

我正在运行以下命令:

mongo-connector -m localhost:27017 -t http://localhost:7474/db/data -d neo4j_doc_manager

但是得到以下错误:

No handlers could be found for logger "mongo_connector.util"<br/>
Traceback (most recent call last):<br/>
  File "/usr/local/bin/mongo-connector", line 11, in <module>
    sys.exit(main())<br/>
  File "/usr/local/lib/python2.7/site-packages/mongo_connector/util.py", line 85, in wrapped<br/>
    func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-<br/>packages/mongo_connector/connector.py", line 1041, in main
    conf.parse_args()<br/>
  File "/usr/local/lib/python2.7/site-packages/mongo_connector/config.py", line 118, in parse_args
    option, dict((k, values.get(k)) for k in option.cli_names))
  File "/usr/local/lib/python2.7/site-packages/mongo_connector/connector.py", line 824, in apply_doc_managers
    module = import_dm_by_name(dm['docManager'])<br/>
  File "/usr/local/lib/python2.7/site-packages/mongo_connector/connector.py", line 814, in import_dm_by_name
    "vailable doc managers." % full_name)
mongo_connector.errors.InvalidConfiguration: Could not import mongo_connector.doc_managers.neo4j_doc_manager. It could be that this doc manager has been moved out of this project and is maintained elsewhere. Make sure that you have the doc manager installed alongside mongo-connector. Check the README for a list of available doc managers.

注意:我正在使用neo4j 3.0,os:macosx,python:2.7 **

1 个答案:

答案 0 :(得分:2)

这似乎是由于未能将py2neo依赖项固定到特定版本而导致的错误。这个项目是使用py2neo 2.0.7编写的,但未能确定该版本,因为py2neo 3.0现在正在被拉入一些东西。

我们将很快推出3.0的更新,同时你可以通过卸载py2neo并安装2.0.7版来解决这个问题:

lyonwj@lyonwjs-MacBook-Pro-2 ~/n/mongo_demo> pip uninstall py2neo
Uninstalling py2neo-3
...
lyonwj@lyonwjs-MacBook-Pro-2 ~/n/mongo_demo> pip install py2neo==2.0.7
Collecting py2neo==2.0.7
  Downloading py2neo-2.0.7.tar.gz (251kB)
    100% |████████████████████████████████| 256kB 2.6MB/s
Installing collected packages: py2neo
  Running setup.py install for py2neo ... done
Successfully installed py2neo-2.0.7
lyonwj@lyonwjs-MacBook-Pro-2 ~/n/mongo_demo>
mongo-connector -m localhost:27017 -t http://localhost:7474/db/data -d neo4j_doc_manager
Logging to mongo-connector.log.

请参阅https://github.com/neo4j-contrib/neo4j_doc_manager/issues/60