2012-11-13 13 views
1

的web2py安裝在Linux Redhat的64位解壓縮的web2py最新的源代碼(Python的2.7.3)後,我開始在服務器和第一次調用生成該堆棧跟蹤:異常新鮮首發Linux上

[email protected]:~/web2py> python web2py.py --ip xxx.xxx.xxx.xxx 
web2py Web Framework 
Created by Massimo Di Pierro, Copyright 2007-2012 
Version 2.2.1 (2012-10-21 16:57:04) stable 
Database drivers available: MySQL(pymysql), PostgreSQL(pg8000), IMAP(imaplib) 
WARNING:web2py:GUI not available because Tk library is not installed 

choose a password: 
please visit: 
     http://xxx.xxx.xxx.xxx:8000 
use "kill -SIGTERM 4341" to shutdown the web2py server 
DEBUG: connect attempt 0, connection error: 
Traceback (most recent call last): 
    File "/home/aomoper/web2py/gluon/dal.py", line 6755, in __init__ 
    self._adapter = ADAPTERS[self._dbname](**kwargs) 
    File "/home/aomoper/web2py/gluon/dal.py", line 2079, in __init__ 
    if do_connect: self.find_driver(adapter_args) 
    File "/home/aomoper/web2py/gluon/dal.py", line 695, in find_driver 
    raise RuntimeError, "no driver available %s" % self.drivers 
TypeError: not all arguments converted during string formatting 
DEBUG: connect attempt 1, connection error: 
Traceback (most recent call last): 
    File "/home/aomoper/web2py/gluon/dal.py", line 6755, in __init__ 
    self._adapter = ADAPTERS[self._dbname](**kwargs) 
    File "/home/aomoper/web2py/gluon/dal.py", line 2079, in __init__ 
    if do_connect: self.find_driver(adapter_args) 
    File "/home/aomoper/web2py/gluon/dal.py", line 695, in find_driver 
    raise RuntimeError, "no driver available %s" % self.drivers 
TypeError: not all arguments converted during string formatting 
DEBUG: connect attempt 2, connection error: 
Traceback (most recent call last): 
    File "/home/aomoper/web2py/gluon/dal.py", line 6755, in __init__ 
    self._adapter = ADAPTERS[self._dbname](**kwargs) 
    File "/home/aomoper/web2py/gluon/dal.py", line 2079, in __init__ 
    if do_connect: self.find_driver(adapter_args) 
    File "/home/aomoper/web2py/gluon/dal.py", line 695, in find_driver 
    raise RuntimeError, "no driver available %s" % self.drivers 
TypeError: not all arguments converted during string formatting 
DEBUG: connect attempt 3, connection error: 
Traceback (most recent call last): 
    File "/home/aomoper/web2py/gluon/dal.py", line 6755, in __init__ 
    self._adapter = ADAPTERS[self._dbname](**kwargs) 
    File "/home/aomoper/web2py/gluon/dal.py", line 2079, in __init__ 
    if do_connect: self.find_driver(adapter_args) 
    File "/home/aomoper/web2py/gluon/dal.py", line 695, in find_driver 
    raise RuntimeError, "no driver available %s" % self.drivers 
TypeError: not all arguments converted during string formatting 
DEBUG: connect attempt 4, connection error: 
Traceback (most recent call last): 
    File "/home/aomoper/web2py/gluon/dal.py", line 6755, in __init__ 
    self._adapter = ADAPTERS[self._dbname](**kwargs) 
    File "/home/aomoper/web2py/gluon/dal.py", line 2079, in __init__ 
    if do_connect: self.find_driver(adapter_args) 
    File "/home/aomoper/web2py/gluon/dal.py", line 695, in find_driver 
    raise RuntimeError, "no driver available %s" % self.drivers 
TypeError: not all arguments converted during string formatting 

Anyone can help please? 
Thanks 
+0

學習在此處設置您的代碼的格式(將代碼格式設置爲代碼)。我們也可能需要一些代碼。 – Marcin

+0

是的,做了第三次嘗試:)我沒有代碼顯示,這是web2py開箱即用。 –

+0

可能的重複:[爲什麼web2py會在啓動時崩潰?](http://stackoverflow.com/questions/8857953/why-does-web2py-crash-for-me-upon-startup)。我似乎是無法找到任何安裝的數據庫驅動程序包。你計劃使用哪個數據庫後端?儘管SQLite至少應該可用(Python標準庫附帶)。另請參閱:[web2py手冊:數據庫抽象層](https://web2py.com/books/default/chapter/29/06)。 –

回答

0

這個問題是相關的到Python安裝中缺少的sqlite3。

用該庫重新編譯Python解決了這個問題。