2012-01-13 90 views
3

我「試圖讓web2py的一個Ubuntu機器上運行所有的文檔似乎表明,一個* nix的系統上運行它,你下載源代碼並做:爲什麼web2py在啓動時崩潰? 。

蟒蛇web2py.py

我抓起source(來源穩定,沒有樹幹,版本1.99.4),並試圖以上,但進入了我得到的服務器密碼(在終端)後:在瀏覽器中

$ python web2py.py 
web2py Web Framework 
Created by Massimo Di Pierro, Copyright 2007-2011 
Version 1.99.4 (2011-12-14 14:46:14) stable 
Database drivers available: google 
Starting hardcron... 
WARNING:web2py.cron:WEB2PY CRON: Disabled because no file locking 
please visit: 
    http://127.0.0.1:8000 
starting browser... 
failed to create drawable 
DEBUG: connect attempt 0, connection error: 
Traceback (most recent call last): 
    File "/home/aparkin/Downloads/web2py/gluon/dal.py", line 4736, in __init__ 
    self._adapter = ADAPTERS[self._dbname](*args) 
    File "/home/aparkin/Downloads/web2py/gluon/dal.py", line 1634, in __init__ 
    raise RuntimeError, "Unable to import driver" 
RuntimeError: Unable to import driver 
WARNING:web2py.cron:WEB2PY CRON: Disabled because no file locking 
DEBUG: connect attempt 1, connection error: 
Traceback (most recent call last): 
    File "/home/aparkin/Downloads/web2py/gluon/dal.py", line 4736, in __init__ 
    self._adapter = ADAPTERS[self._dbname](*args) 
    File "/home/aparkin/Downloads/web2py/gluon/dal.py", line 1634, in __init__ 
    raise RuntimeError, "Unable to import driver" 
RuntimeError: Unable to import driver 
DEBUG: connect attempt 2, connection error: 
Traceback (most recent call last): 
    File "/home/aparkin/Downloads/web2py/gluon/dal.py", line 4736, in __init__ 
    self._adapter = ADAPTERS[self._dbname](*args) 
    File "/home/aparkin/Downloads/web2py/gluon/dal.py", line 1634, in __init__ 
    raise RuntimeError, "Unable to import driver" 
RuntimeError: Unable to import driver 
DEBUG: connect attempt 3, connection error: 
Traceback (most recent call last): 
    File "/home/aparkin/Downloads/web2py/gluon/dal.py", line 4736, in __init__ 
    self._adapter = ADAPTERS[self._dbname](*args) 
    File "/home/aparkin/Downloads/web2py/gluon/dal.py", line 1634, in __init__ 
    raise RuntimeError, "Unable to import driver" 
RuntimeError: Unable to import driver 
DEBUG: connect attempt 4, connection error: 
Traceback (most recent call last): 
    File "/home/aparkin/Downloads/web2py/gluon/dal.py", line 4736, in __init__ 
    self._adapter = ADAPTERS[self._dbname](*args) 
    File "/home/aparkin/Downloads/web2py/gluon/dal.py", line 1634, in __init__ 
    raise RuntimeError, "Unable to import driver" 
RuntimeError: Unable to import driver 

然後我得到:

Internal error 
Ticket issued: welcome/127.0.0.1.2012-.....[abbreviated] 

有什麼建議嗎?我正在運行Python 2.7.1+。我已經在其他地方看過,你還需要爲web2py安裝pyschopg2才能運行,並且我確認這實際上也已安裝(我做了一個sudo apt-get install python-psycopg2並得到了「python-psycopg2已經是最新版本」)。

+0

您並不需要psycopg2來運行web2py - 如果您想在web2py中使用PostgreSQL,則只需要它。 – Anthony 2012-01-14 18:18:34

回答

0

我只是下載並運行web2py的在Ubuntu OK,蟒蛇2.7.2+

布魯斯@ vaiubuntu:〜/下載/ web2py的$蟒蛇web2py.py

web2py Web Framework 
Created by Massimo Di Pierro, Copyright 2007-2011 
Version 1.99.4 (2011-12-14 14:46:14) stable 
Database drivers available: SQLite3, pymysql, PostgreSQL 
Starting hardcron... 

你們是不是要運行的web2py在appengine環境?

你的Python中有SQLITE模塊嗎?

可能性是權限問題,您的用戶有權寫入web2py/*文件夾?

+0

A)否對appengine環境(現在),B)你如何測試SQLITE模塊是否工作正常?和C)權限可能是一個問題,將進行調查。 – 2012-01-16 16:31:03

0

它看起來像web2py 1.99.4中的錯誤。我在使用Postgres和psycopg2時遇到了同樣的問題,但在Windows中。

我試過1.99.2,它工作得很好。

實際上,這個錯誤似乎與隱含的錯誤信息有關 - 1.99.2給了我錯誤信息,數據庫不存在,很容易修復。 1.99.4沒有提到丟失的數據庫。但是,當我創建數據庫並嘗試使用1.99.4時,它工作正常。

相關問題