
linux
qq_32312323
爱吃土豆豆
的蜗牛
展开
-
windows下运行完好的python代码部署linux环境下报错configparser.NoSectionError: No section: 'xxx'
windows下写了一个脚本,引用了configparser这个模块,读取配置文件cfg.ini。在windows下运行完全没问题,每想到一道linux环境下运行,就报错了。提示"configparser.NoSectionError: No section: 'xxx'"这个错误。 之前windows下也出过这个错误,是因为我用记事本等编辑了我的配置文件,导致内容编码有问题,后来重新用PyCh...原创 2019-06-19 16:38:54 · 793 阅读 · 0 评论 -
MongoDB设置用户名密码报错 "createUser" command requires a "roles" array at src/mongo/shell/db.js:1086
背景 在linux环境下,创建了mongoDB的数据库,并且导入了数据。脚本写入数据没有问题,但是查询数据会报错。 pymongo.errors.OperationFailure: not authorized on music to execute command { delete: "xxxx", ordered: true, deletes: [ { q: { CreateDate: ...原创 2019-06-20 11:35:51 · 1201 阅读 · 0 评论