Internal Server Error: /accounts/login/
IndexError at /accounts/login/
list index out of range
Request Method: GET
Request URL: https://WEBLATEHOST/accounts/login/?next=/js/i18n/
Django Version: 1.9.6
Python Executable: /usr/bin/uwsgi-core
Python Version: 2.7.9
Python Path: ['/var/www/html/Weblate-2.6/', '.', '', '/var/www/venv/lib/python2.7', '/var/www/venv/lib/python2.7/plat-x86_64-linux-gnu', '/var/www/venv/lib/python2.7/lib-tk', '/var/www/venv/lib/python2.7/lib-old',
+'/var/www/venv/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/var/www/venv/local/lib/python2.7/site-packages', '/var/www/venv/lib/python2.7/site-packages']
Server time: Wed, 8 Jun 2016 09:17:31 +0200
Installed Applications:
(u'django.contrib.auth',
u'django.contrib.contenttypes',
u'django.contrib.sessions',
u'django.contrib.sites',
u'django.contrib.messages',
u'django.contrib.staticfiles',
u'django.contrib.admin',
u'django.contrib.admindocs',
u'django.contrib.sitemaps',
u'social.apps.django_app.default',
u'crispy_forms',
u'compressor',
u'rest_framework',
u'rest_framework.authtoken',
u'weblate.trans',
u'weblate.lang',
u'weblate.accounts',
u'weblate')
Installed Middleware:
(u'django.contrib.sessions.middleware.SessionMiddleware',
u'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
u'django.middleware.common.CommonMiddleware',
u'django.middleware.locale.LocaleMiddleware',
u'django.middleware.csrf.CsrfViewMiddleware',
u'django.contrib.auth.middleware.AuthenticationMiddleware',
u'django.contrib.messages.middleware.MessageMiddleware',
u'django.middleware.clickjacking.XFrameOptionsMiddleware',
u'social.apps.django_app.middleware.SocialAuthExceptionMiddleware',
u'weblate.accounts.middleware.RequireLoginMiddleware')
Traceback:
File "/var/www/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
174. response = self.process_exception_by_middleware(e, request)
File "/var/www/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
172. response = response.render()
File "/var/www/venv/local/lib/python2.7/site-packages/django/template/response.py" in render
160. self.content = self.rendered_content
File "/var/www/venv/local/lib/python2.7/site-packages/django/template/response.py" in rendered_content
137. content = template.render(context, self._request)
File "/var/www/venv/local/lib/python2.7/site-packages/django/template/backends/django.py" in render
95. return self.template.render(context)
File "/var/www/venv/local/lib/python2.7/site-packages/django/template/base.py" in render
204. with context.bind_template(self):
File "/usr/lib/python2.7/contextlib.py" in __enter__
17. return self.gen.next()
File "/var/www/venv/local/lib/python2.7/site-packages/django/template/context.py" in bind_template
260. updates.update(processor(self.request))
File "/var/www/html/Weblate-2.6/weblate/trans/context_processors.py" in weblate_context
44. projects = Project.objects.all_acl(request.user)
File "/var/www/html/Weblate-2.6/weblate/trans/models/project.py" in all_acl
63. return self.get_acl_status(user)[0]
File "/var/www/html/Weblate-2.6/weblate/trans/models/project.py" in get_acl_status
71. cache_key = get_acl_cache_key(user)
File "/var/www/html/Weblate-2.6/weblate/trans/models/project.py" in get_acl_cache_key
52. )[0]
File "/var/www/venv/local/lib/python2.7/site-packages/django/db/models/query.py" in __getitem__
297. return list(qs)[0]
Exception Type: IndexError at /accounts/login/
Exception Value: list index out of range
Request information:
GET:
next = u'/js/i18n/'
POST: No POST data
FILES: No FILES data
COOKIES:
csrftoken = 'TOKEN'
django_language = 'en'
Login form
* Weblate 2.6
* Python 2.7.9
* Django 1.9.6
* six 1.10.0
* python-social-auth 0.2.19
* Translate Toolkit 2.0.0b2
* Whoosh 2.7.4
* Git 2.1.4
* Pillow (PIL) 1.1.7
* dateutil 2.5.3
* lxml 3.6.0
* django-crispy-forms 1.6.0
* compressor 1.6
* djangorestframework 3.3.3
* Database backends: django.db.backends.postgresql_psycopg2
Already fixed in master (by 89ee1ce7906dec1b157a2db1c66fb0dc3b36b5dc, 5b3ba673c3429659e6bf6cdb9427542fa8b71afa and 2c2db2581a825b55f1079c3a3b9f0a849cb7eab3).
Thx for the info. I deleted the anonymous user before this error occured. Is there a way to bring it back via manage.py?
It will get created by:
./manage.py setupgroups
In admin interface it's IMHO not possible to create user with disabled login.
Most helpful comment
It will get created by:
In admin interface it's IMHO not possible to create user with disabled login.