奇怪報錯資訊“db already exists with different case already have”解決方法
之前做了給資料庫插入成交資料的功能,但是更新1.92後,每次成交都報錯
db already exists with different case already have: [VnTrader_DEAL_Db] trying to create [VnTrader_DEAL_Db]
網上查是大小寫問題,說mongodb資料庫名稱不區分大小寫,當有個資料庫的名稱字母相同,但是不同大小寫的情況,就會提出error message,讓你改成完全相同名稱。
問題是我的完全一樣呀,直接copy的,想了半天,自己又測試,發現把原來雙引號改為單引號,就可以了。真是奇怪。
# encoding: UTF-8 from pymongo import MongoClient from vnpy.trader.vtGlobal import globalSetting if __name__ == "__main__": dbClient = MongoClient(globalSetting['mongoHost'], globalSetting['mongoPort'], connectTimeoutMS=500) db = dbClient['VnTrader_DEAL_Db'] collection = db["IC.Test"] collection.insert_one({"key":23})
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22259926/viewspace-2641015/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- django資料庫同步時報錯“Table 'XXX' already exists”Django資料庫
- git使用報錯fatal: remote origin already exists.GitREM
- vagrant up 啟動報錯 Stderr: VBoxManage.exe: error: A NAT rule of this name already existsError
- Swap file "/etc/sysconfig/.iptables.swp" already exists!
- studio if you already have a 64-bit JDK installedJDK
- Redis 啟動報錯Address already in useRedis
- 解決 eclipse出現 Address already in use: bindEclipse
- GitHub 託管程式碼的部分 fatal: remote origin already existsGithubREM
- 【異常解決】springBoot單元測試es報錯availableProcessors is already set to [12], rejecting [12]Spring BootAI
- 安裝啟動service redisd start時報錯 /var/run/redis_6379.pid exists, process is already running or crashedRedis
- mybatis(錯誤) 專案啟動時報“Result Maps collection already contains value forxxx”的解決方案MyBatisAI
- Centos7系統建立使用者時出現“useradd: user ‘xxxx‘ already exists”錯誤CentOS
- already opened by ClassLoader
- 解決nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)NginxAI
- 啟動intellij時報錯Failed to load JVM DLL..jre\bin\jvm.dll,If you already have 32-bit JDK installedIntelliJAIJVMJDK
- efcore This MySqlConnection is already in useMySql
- 解決mybatis出現Mapped Statements collection already contains value for問題MyBatisAPPAI
- 哪吒探針Windows安裝出現Failed to install Nezha Agent: service nezha-agent already exists 如何解決WindowsAI
- git-----You have not concluded your merge (MERGE_HEAD exists)解決Git
- 啟動idea報Failed to load JVM DLL..jre\bin\jvm.dll,If you already have 32-bit JDK installedIdeaAIJVMJDK
- Oracle 條件索引 case when 報錯解決方案Oracle索引
- warning: already initialized constant FileUtils::VERSIONZed
- Result Maps collection already contains value for com.xxx.xxxMapper.BaseResultMap問題解決AIAPP
- Xcode證書管理出現這個錯誤:Your account already has a signing..... 的解決辦法XCode
- Result Maps collection already contains value for xxx.xxx.dao.BaseResultMap錯誤AI
- Windows 啟動 Idea 報錯 if you already hava a 64-bit JDK ... 以及 failed to create jvm...WindowsIdeaJDKAIJVM
- 重啟docker服務後,容器啟動報錯:Error response from daemon: id already in useDockerError
- xxl-job 報:java.net.BindException: Address already in use: bindJavaIndexException
- Several ports (8005, 8080) required by Tomcatv9.0 Server at localhost are already in use.Tomcat解決方案UITomcatServerlocalhost
- 解決ProtocolHandler ["ajp-nio-8009"] java.net.BindException: Address already in use: bind問題ProtocolJavaIndexException
- Uncaught SyntaxError: Identifier 'Geometry' has already been declaredErrorIDE
- VS error LNK2005:**already defined in **.objErrorOBJ
- dbfread報錯ValueError錯誤解決方法Error
- hive使用報錯解決方法Hive
- Failed to execute aapt的奇怪解決方法AIAPT
- 解決pgpool啟動報錯 ifup[/sbin/ip] doesn't have setuid bitUI
- 啟動tomcat時 錯誤: 代理丟擲異常 : java.rmi.server.ExportException: Port already in use: 1099的解決辦法TomcatJavaServerExportException
- 錯誤: 代理丟擲異常錯誤: java.rmi.server.ExportException: Port already in use: 1099;JavaServerExportException