OS X,Python 2.7,一个新鲜的虚拟玩家:
virtualenv bar
source bar/bin/activate
pip install django --upgrade
django-admin.py startproject foo
cd foo
python manage.py runserver
然后我马上得到这个:
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/management/__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'
出了什么问题?
答案 0 :(得分:0)
这个问题似乎与virtualenvwrapper和我自己的愚蠢有关;手动创建virtualenv已经解决了它。