當我嘗試添加一個新的記錄到數據庫的web2py我得到這個錯誤我已經從不同的機器移動的倉庫,但我的所有文件相同web2py的錯誤」 <類的sqlite3.OperationalError'>沒有這樣的表格:申請
我以前的數據庫DAL連接參數如下:
from gluon.contrib.appconfig import AppConfig
myconf = AppConfig(reload=True)
if not request.env.web2py_runtime_gae:
db = DAL(myconf.get('db.'+myconf.get('db.mode')+'_uri'),
pool_size=myconf.get('db.pool_size'),
migrate=myconf.get('db.migrate'),
migrate_enabled=myconf.get('db.migrate_enabled'),
#fake_migrate_all=myconf.get('db.fake_migrate_all'),
fake_migrate_all=True,
check_reserved=['all'])
else:
db = DAL('google:datastore+ndb')
session.connect(request, response, db=db)
這是給我user_auth
沒有發現錯誤,所以我把它改爲這個按照官方的文檔:
from gluon.contrib.appconfig import AppConfig
myconf = AppConfig(reload=True)
if not request.env.web2py_runtime_gae:
db = DAL('sqlite://storage.sqlite', pool_size=1, check_reserved=['all'], migrate=False, fake_migrate_all=True)
else:
db = DAL('google:datastore+ndb')
它顯示/數據庫中的所有表,並在「Database_Administration」控制檯我試圖添加一個新的記錄我得到下面的錯誤。
Web2py Error" <class 'sqlite3.OperationalError'> no such table: application
在我的應用程序中沒有名爲「application」的表,所以它必須與app相關。請指教。