pymongo.errors.OperationFailure: cannot run map reduce without the js engine

前端之家收集整理的这篇文章主要介绍了pymongo.errors.OperationFailure: cannot run map reduce without the js engine前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

在执行mongodb中执行js语句时,提示错误

pymongo.errors.OperationFailure: cannot run map reduce without the js engine

这是因为mongodb默认情况下配置js引擎,但是在我们的SIT / UAT环境中,由于DBA会产生安全问题,因此禁用JS引擎来运行javascript代码

如果想要继续执行js代码,那么就需要打开js引擎。

如果是用mongodb源码编译,那么可以执行以下代码

scons --release --usev8


猜你在找的MongoDB相关文章