【发布时间】:2012-02-19 15:29:06
【问题描述】:
我删除了我的 Web2Py 应用程序中的所有目录,除了控制器、模型、视图和静态文件,以尝试重置我的应用程序,因为我对我的数据库结构进行了一些更改,并且认为迁移太麻烦了一个数据库几乎为空的新应用。
现在我在控制台中收到一个错误,提示 web2py 无法打开数据库文件。网络界面给了我一张未知的票。
这是来自控制台的消息:
DEBUG: connect attempt 4, connection error: Traceback (most recent call last): File "E:\Programming\Python\web2py\gluon\dal.py", line 4736, in __init__
self._adapter = ADAPTERS[self._dbname](*args) File "E:\Programming\Python\web2py\gluon\dal.py", line 1655, in __init__
self.pool_connection(connect) File "E:\Programming\Python\web2py\gluon\dal.py", line 444, in pool_connection
self.connection = f() File "E:\Programming\Python\web2py\gluon\dal.py", line 1654, in connect
return self.driver.Connection(dbpath, **driver_args) OperationalError: unable to open database file ERROR:web2py:Traceback (most recent call last): File "E:\Programming\Python\web2py\gluon\restricted.py", line 204, in restrict ed
exec ccode in environment File "E:/Programming/Python/web2py/applications/vote_up\compiled\models\db.py" , line 14, in <module> File "E:\Programming\Python\web2py\gluon\dal.py", line 4749, in __init__
raise RuntimeError, "Failure to connect, tried %d times:\n%s" % (attempts, t b) RuntimeError: Failure to connect, tried 5 times: Traceback (most recent call last): File "E:\Programming\Python\web2py\gluon\dal.py", line 4736, in __init__
self._adapter = ADAPTERS[self._dbname](*args) File "E:\Programming\Python\web2py\gluon\dal.py", line 1655, in __init__
self.pool_connection(connect) File "E:\Programming\Python\web2py\gluon\dal.py", line 444, in pool_connection
self.connection = f() File "E:\Programming\Python\web2py\gluon\dal.py", line 1654, in connect
return self.driver.Connection(dbpath, **driver_args) OperationalError: unable to open database file
代码可在GitHub获取。
如何让 Web2Py 将其视为一个全新的应用程序?
【问题讨论】:
标签: web2py