shelve: db type could not be determined
Posted zhoudabing
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了shelve: db type could not be determined相关的知识,希望对你有一定的参考价值。
使用shelve持久序列化格式时,出现以下错误
shelve: db type could not be determined
代码如下:
import shelve
f = shelve.open(‘1234.txt‘)
names = ["qwe", "raqqin", "teest"]
info = {‘nqq‘:‘aleex‘,‘agee‘:22}
f[‘names‘] = names
f[‘info‘] = info
f.close()
解决办法,将open()里的文件后缀名去掉,因为shelve存储文件后缀名为.bak .dir,open()里的文件名不需要提供扩展名,系统会自动
帮你创建后缀名为.bak .dir格式的存储文件.
以上是关于shelve: db type could not be determined的主要内容,如果未能解决你的问题,请参考以下文章
java hibernate:could not resolve property: nationNum of: com.shq.db.Department
java.io.FileNotFoundException: Could not open ServletContext resource [/db.properties]
java.io.FileNotFoundException: Could not open ServletContext resource [/db.properties]
hibernate 错误 could not determine type for
pyarrow.lib.ArrowInvalid: ('Could not convert X with type Y: did not identify Python value type when
org.apache.ibatis.type.TypeException: Could not resolve type alias 'BIGINT'