草庐IT

index_name

全部标签

【已解决】Python打包文件执行报错:ModuleNotFoundError: No module named ‘pymssql‘

【已解决】Python打包文件执行报错:ModuleNotFoundError:Nomodulenamed'pymssql'1、问题2、原因3、解决1、问题今天打包一个tkinter+pymssql的项目的时候,打包过程很顺利,但是打开软件的时候,报错ModuleNotFoundError:Nomodulenamed'pymssql'如下图:2、原因查了好多资料才知道:打包程序无法判断pymssql动态调用,其中的_mssql方法是动态调用的,就是用才调用,不会一开始就调用,于是打包程序就不知道要不要包进exe里面,估计打包的时候不会去尝试运行pymssql里面的函数,因此也无法得知动态调用的

mongodb - 我们是否需要删除名为 system.indexes 的集合以使新索引应用于该集合

我对MongoDB中的索引有疑问。我使用的是MongoDB1.6.5版。我正在修改我所有的收藏索引。当我在我的MongoDBshell中使用showcollections命令时,它显示了我的一个集合system.indexesstocksoptions我是否需要删除集合system.indexes才能应用集合上的新索引? 最佳答案 然而system.profile集合不在那里,不,你没有。profile集合是分析器的输出,仅此而已。索引仍然适用。编辑由于您的问题说明了两件事,所以您也不需要删除system.indexes,Mongo

Python mongodb create_index 错误

我收到这个错误:错误:cache_for必须是整数或float。那是因为这一行:self.db.table_name.create_index("url",{"unique":True})但我不知道为什么,这里有什么问题? 最佳答案 你做错了正确的语法是:self.db.table_name.create_index("url",unique=True)默认情况下,这会创建一个单键升序索引,等同于self.db.table_name.create_index([("url",pymongo.ASCENDING)],unique=Tr

node.js - fatal error : Schema hasn't been registered for model "a". 使用 mongoose.model(name, schema)

我有以下错误:Fatalerror:Schemahasn'tbeenregisteredformodel"a".Usemongoose.model(name,schema)这是我的文件结构:--------a.model.js--------'usestrict';varmongoose=require('mongoose'),Schema=mongoose.Schema;varA=newSchema({name:String,});module.exports=mongoose.model('A',A);--------b.model.js--------'usestrict';va

mongodb - meteor /MongoDB : Update an array item in a collection by index

这是我的收藏结构的概述:{profile:{first_name:'Plop',surname:'Plopette',...},medical_history:{significant_illnesses:['Asthma','Diabetes'],...}}如何访问和更新medical_history.significant_illnesses数组中的一项?我的失败很惨:Patients.update(Session.get("current_patient"),{$push:{"medical_history.significant_surgeries.surgeryIndex":

node.js - GraphQL 错误 : Must provide name

我正在编写用于在NodeJS中登录用户的突变。它给出错误“必须提供名称”。这是浏览器GraphQL查询:mutation{login(username:"dfgdfg",password:"test1234"){_id,name{fname,lname,mname}}}这是我的代码constlogin={type:UserType,args:{input:{name:'Input',type:newGraphQLNonNull(newGraphQLObjectType({username:{name:'Username',type:newGraphQLNonNull(GraphQLSt

node.js - 应该如何使用 mongoose 的 model.on ('index' , ...)?

在查看MongoDB/Node.js的MongooseJS文档时,似乎可以像这样在对象上指定索引:varMyModelSchema=newSchema({name:String,index:true});varMyModel=mongoose.model('MyModel',MyModelSchema);MyModel.on('index',function(){doStuff();});根据文档,Mongoose将在启动时调用ensureIndex(),除非“autoIndex”选项在模式中明确设置为false。完成后,'index'事件将在模型上发出,这将触发回调。我的理解是,这允

javascript - 无法读取未定义的属性 'user_first_name'

我正在尝试使用expressjs/mongoose注册用户,但出现以下错误:TypeError:Cannotreadproperty'user_first_name'ofundefinedatC:\QuizwebPolitica\server.js:20:24atLayer.handle[ashandle_request](C:\QuizwebPolitica\node_modules\express\lib\router\layer.js:95:5)atnext(C:\QuizwebPolitica\node_modules\express\lib\router\route.js:1

python - jupyter 笔记本 - ImportError : No module named 'bson'

尝试使用一些jupyternotebook,我遇到了bson模块的问题,如错误中所报告的那样,接缝不可用:“ImportError:没有名为‘bson’的模块”我在专用虚拟环境中可用的python2.7内核上运行jupyternotebook4.3.0。我试图通过一个简单的“condainstallbson”手动安装bson模块,但它不在官方/标准repo中,所以我不得不安装OpenMDAO/bson。最后,它没有改变问题。我知道该模块可能来自pymongo包,所以我尝试安装并得到相同的结果。这里有什么提示吗?bson和pymongo之间有什么联系? 最佳答

Git在add的时候出现error: unable to index file 的问题,导致add失败

出现的问题error:unabletoindexfile'Temp/FSTimeGet-492871c0bc7b1ca469f177d922e10e64fatal:addingfilesfailed 上面的问题导致无法将代码提交到暂存区,查看git状态时文件为红色(Untrackedfiles)。解决方案:1、在项目文件夹(.git文件所在的文件夹)里面新建一个.gitignore文件2、在.gitignore文件里面添加上面出现问题的文件路径,即  Temp/