在将mongoengine从0.8.7升级到0.10.9时,发现以下问题:
handle = connect(mdb_db, username = mdb_username, password = mdb_passwd, host = mdb_host, port = mdb_port)
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "lib/python2.7/site-packages/mongoengine/connection.py", line 224, in connect
return get_connection(alias) File "lib/python2.7/site-packages/mongoengine/connection.py", line 184, in get_connection
raise ConnectionError("Cannot connect to database %s :\n%s" % (alias, e)) mongoengine.connection.ConnectionError: Cannot connect to database default : 'str' object has no attribute 'copy'
但是,仅将pymongo从2.8.1升级到2.9.5并将mongoengine保持在0.8.7不会破坏连接方法。
mongoengine文档或更改日志未涵盖此问题。
关于发生了什么问题的任何输入?另外,该如何解决?