奇怪報錯資訊“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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- git使用報錯fatal: remote origin already exists.GitREM
- android/libs/libammsdk.jar" already exists! 解決方法AndroidJAR
- ORA-27100: shared memory realm already exists解決方法
- ORA-27100 shared memory realm already exists錯誤解決
- ora-27100:shared memory realm already exists錯誤的解決
- 配置tsm在格式化資料庫資訊的時候報錯:This database name already exists資料庫Database
- NAVICATE 修改儲存過程提示PROCEDURE _Navicat_Temp_Stored_Proc already exists 解決方法儲存過程
- vagrant up 啟動報錯 Stderr: VBoxManage.exe: error: A NAT rule of this name already existsError
- django資料庫同步時報錯“Table 'XXX' already exists”Django資料庫
- studio if you already have a 64-bit JDK installedJDK
- Redis 啟動報錯Address already in useRedis
- 怎樣解決 [Vue warn]: The computed property "count" is already defined in data. 報錯問題?Vue
- Swap file "/etc/sysconfig/.iptables.swp" already exists!
- 刪除編輯檔案警告Swap file “…” already exists!
- linux——學習1the home directory already exists.Linux
- oninit -vy 出錯: Fatal error in shared memory creation 以及 shared memory already existsError
- PRCS-1007 : Server pool racdb already existsServer
- aix Oracle 使用者報錯:Too many processes already existAIOracle
- mongoDB的db.shutdownServer()報錯的解決方法MongoDBServer
- GitHub 託管程式碼的部分 fatal: remote origin already existsGithubREM
- 解決 eclipse出現 Address already in use: bindEclipse
- Warning: Cannot send session cookie - headers already sent 解決SessionCookieHeader
- Address already in use: JVM_Bind:80 解決方案JVM
- RMAN-20002: target database already registered in recovery catalog 解決方法Database
- Oracle 條件索引 case when 報錯解決方案Oracle索引
- Thread already joined at **thread
- 解決svnserve: Can't bind server socket: Address already in useServer
- java.lang.IllegalStateException: getOutputStream() has already been called for this response解決方案JavaException
- getOutputStream() has already been called
- efcore This MySqlConnection is already in useMySql
- 解決nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)NginxAI
- 【MySQL】重放binlog故障一則 ERROR 1050 (42S01) : Table '' already existsMySqlError
- 安裝啟動service redisd start時報錯 /var/run/redis_6379.pid exists, process is already running or crashedRedis
- 解決 PHP Warning: Module 'modulename' already loaded in Unknown on line 0PHP
- hive使用報錯解決方法Hive
- Centos7系統建立使用者時出現“useradd: user ‘xxxx‘ already exists”錯誤CentOS
- ORA-13607: The specified task or object ,SYS_AUTO_SPCADV_xxx already existsObjectPCA
- 解決mybatis出現Mapped Statements collection already contains value for問題MyBatisAPPAI