1
遇到很多嘗試在Python中使用擱架的問題。無法打開Python擱置對象
我能夠就好了剛纔創建一個新的貨架* .dbm對象,但現在,我得到了一個錯誤:
import shelve
TESTING = shelve.open('C:\Users\dtruman\Documents\PROJECTS\testing.dbm','c',writeback=True)
的Python返回以下神祕的錯誤:
Traceback (most recent call last):
File "<pyshell#7>", line 1, in <module>
TESTING = shelve.open('C:\Users\dtruman\Documents\PROJECTS\testing.dbm','c',writeback=True)
File "C:\Program Files (x86)\Python_2-7-11\lib\shelve.py", line 243, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "C:\Program Files (x86)\Python_2-7-11\lib\shelve.py", line 227, in __init__
Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
File "C:\Program Files (x86)\Python_2-7-11\lib\anydbm.py", line 85, in open
return mod.open(file, flag, mode)
File "C:\Program Files (x86)\Python_2-7-11\lib\dbhash.py", line 18, in open
return bsddb.hashopen(file, flag, mode)
File "C:\Program Files (x86)\Python_2-7-11\lib\bsddb\__init__.py", line 364, in hashopen
d.open(file, db.DB_HASH, flags, mode)
DBError: (14, 'Bad address')
這似乎是我試圖執行一個非常簡單的操作,但由於某種原因,Python不喜歡它。