为什么 web2py 在启动时会崩溃? [英] Why does web2py crash for me upon startup?

查看:33
本文介绍了为什么 web2py 在启动时会崩溃?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让 web2py 在 Ubuntu 机器上运行.所有文档似乎都表明要在 *nix 系统上运行它,您下载源代码并执行:

I"m trying to get web2py running on an Ubuntu machine. All the docs seem to indicate that to run it on a *nix system, you download the source and do:

python web2py.py

python web2py.py

我获取了 (稳定源,不是主干,版本 1.99.4) 并尝试了上述操作,但是在输入服务器密码后我得到了(在终端中):

I grabbed the source (stable source, not the trunk, version 1.99.4) and tried the above, but after entering a password for the server I get (in the terminal):

$ 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

然后在浏览器中我得到:

And then in the browser I get:

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 已经是最新版本了").

Any suggestions? I'm running Python 2.7.1+. I've read elsewhere that you also need pyschopg2 installed for web2py to run, and I've confirmed that this is in fact installed as well (I did a sudo apt-get install python-psycopg2 and got "python-psycopg2 is already the newest version").

推荐答案

我刚下载,web2py 在 ubuntu、python 2.7.2+ 中运行正常

I just downloaded and web2py runs ok in ubuntu, python 2.7.2+

bruce@vaiubuntu:~/Downloads/web2py$ python web2py.py

bruce@vaiubuntu:~/Downloads/web2py$ 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: SQLite3, pymysql, PostgreSQL
Starting hardcron...

您是否尝试在 appengine 环境中运行 web2py?

Are you trying to run web2py on appengine environment?

你的 Python 中有 SQLITE 模块吗?

Do you have SQLITE module working ok in your Python?

可能是权限问题,你的用户有权限写入 web2py/* 文件夹吗?

A possibility is permission issue, your user have permission to write to web2py/* folder?

这篇关于为什么 web2py 在启动时会崩溃?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆