python - 在 Linux 上启动新安装的 web2py 时出现异常

标签 python linux web2py redhat

在 Linux Redhat 64 位(Python 2.7.3)上解压 web2py 最新源代码后,我启动服务器,第一次调用生成此堆栈跟踪:

test@test:~/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

最佳答案

此问题与 Python 安装中缺少 sqlite3 有关。

用那个库重新编译 Python 解决了这个问题。

关于python - 在 Linux 上启动新安装的 web2py 时出现异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13367104/

相关文章:

python - 无法读取图像 web2py

python - 在mac雪豹Mac OS X 10.6.8上安装mysql报错

linux - 给出一个路径的挂载点

sql-server-2008 - Web2Py 不会连接到 MSSQL

linux - 由于目录级别的权限问题,Spark 作业失败

c - 文件读取问题 - 平行版生命游戏

web2py - 如何更改 pythonanywhere 上的 web2py 连接超时?

Python TLS 握手 XMPP

python - 对 A 列进行分组后,将 B 列中的唯一值转置到新列

python - django AbstractUser模型 'str'对象没有属性 '_meta'