开发者

manage.py runserver fails

OS X, Python 2.7, a fresh virtualenv:

virtualenv bar
source bar/bin/activate
pip install django --upgrade
django-admin.py startproject foo
cd foo
python manage.py runserver

Then I immediately get this:

Traceback (most recent call last):
File "manage.py", line 14, in <module>
execute_manager(settings)
File "/Users/xyz/.virtualenvs/bar/lib/python2.7/site-packages/django/core/manage开发者_运维技巧ment/__init__.py", line 438, in execute_manager
utility.execute()
File "/Users/xyz/.virtualenvs/bar/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/xyz/.virtualenvs/bar/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Users/xyz/.virtualenvs/bar/lib/python2.7/site-packages/django/core/management/base.py", line 209, in execute
translation.activate('en-us')
File "/Users/xyz/.virtualenvs/bar/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 100, in activate
return _trans.activate(language)
File "/Users/xyz/.virtualenvs/bar/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 43, in __getattr__
if settings.USE_I18N:
File "/Users/xyz/.virtualenvs/bar/lib/python2.7/site-packages/django/utils/functional.py", line 276, in __getattr__
self._setup()
File "/Users/xyz/.virtualenvs/bar/lib/python2.7/site-packages/django/conf/__init__.py", line 42, in _setup
self._wrapped = Settings(settings_module)
File "/Users/xyz/.virtualenvs/bar/lib/python2.7/site-packages/django/conf/__init__.py", line 139, in __init__
logging_config_func(self.LOGGING)
File "/Users/xyz/.virtualenvs/bar/lib/python2.7/site-packages/django/utils/dictconfig.py", line 553, in dictConfig
dictConfigClass(config).configure()
File "/Users/xyz/.virtualenvs/bar/lib/python2.7/site-packages/django/utils/dictconfig.py", line 321, in configure
del logging._handlerList[:]
AttributeError: 'module' object has no attribute '_handlerList'

What's going wrong?


This issue seems somehow related to virtualenvwrapper, and my own stupidity; creating a virtualenv manually has resolved it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜