4

Just tried integrating Lettuce into my django installation and getting the following error:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/var/www/abc/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/var/www/abc/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/var/www/abc/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 272, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/var/www/abc/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 75, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/var/www/abc/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/var/www/abc/local/lib/python2.7/site-packages/lettuce/django/__init__.py", line 19, in <module>
    from lettuce.django.server import Server
  File "/var/www/abc/local/lib/python2.7/site-packages/lettuce/django/server.py", line 33, in <module>
    from django.core.servers.basehttp import WSGIServerException
ImportError: cannot import name WSGIServerException

I heard that WSGIServerException was removed from django, so how do I get around this?

4

2 回答 2

3

它已在分支 master 上修复,但在PyPI上尚不可用。

您可以简单地从源代码安装它:

pip install -e git+https://github.com/gabrielfalcao/lettuce.git#egg=lettuce
于 2014-03-24T17:30:02.547 回答
2

医生_

未记录的 django.core.servers.basehttp.WSGIServerException 已被删除。请改用标准库提供的 socket.error 。

我想你可以告诉“lettuce”的作者,0.0 .or:更新“lettuce”python 包。

于 2013-11-14T05:23:53.187 回答