我删除了我的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将其视为一个全新的应用程序?
答案 0 :(得分:1)
我通常会做以下