#26409: Python 2.7.11
--------------------------------------------+--------------------
Reporter: Walkman | Owner: nobody
Type: Bug | Status: new
Component: Core (Management commands) | Version: 1.9
Severity: Release blocker | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------------+--------------------
Python 2.7.11 causes this exception when running `manage.py` or `django-
admin.py:`
{{{
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/site-
packages/django/core/management/__init__.py", line 353, in
execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/site-
packages/django/core/management/__init__.py", line 327, in execute
django.setup()
File "/usr/local/lib/python2.7/site-packages/django/__init__.py", line
18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/site-packages/django/apps/registry.py",
line 115, in populate
app_config.ready()
File "/usr/local/lib/python2.7/site-
packages/django/contrib/admin/apps.py", line 22, in ready
self.module.autodiscover()
File "/usr/local/lib/python2.7/site-
packages/django/contrib/admin/__init__.py", line 26, in autodiscover
autodiscover_modules('admin', register_to=site)
File "/usr/local/lib/python2.7/site-
packages/django/utils/module_loading.py", line 50, in autodiscover_modules
import_module('%s.%s' % (app_config.name, module_to_search))
File "/usr/local/lib/python2.7/importlib/__init__.py", line 37, in
import_module
__import__(name)
File "/officecontrol/src/core/admin.py", line 45, in <module>
class UserChangeForm(forms.ModelForm):
File "/usr/local/lib/python2.7/site-packages/django/forms/models.py",
line 247, in __new__
opts.field_classes)
File "/usr/local/lib/python2.7/site-packages/django/forms/models.py",
line 172, in fields_for_model
formfield = f.formfield(**kwargs)
File "/usr/local/lib/python2.7/site-
packages/django/db/models/fields/__init__.py", line 1120, in formfield
return super(CharField, self).formfield(**defaults)
File "/usr/local/lib/python2.7/site-
packages/django/db/models/fields/__init__.py", line 884, in formfield
defaults['choices'] = self.get_choices(include_blank=include_blank)
File "/usr/local/lib/python2.7/site-
packages/django/db/models/fields/__init__.py", line 811, in get_choices
for choice, __ in choices:
ValueError: too many values to unpack
}}}
I can reproduce it every time. **Earlier python versions are not
affected.**
We have a custom User model and customized UserAdmin if it matters.
My dependencies:
{{{
django-crispy-forms==1.6.0
django-mptt==0.8.3
django-rest-swagger==0.3.5
django-solo==1.1.2
django-widget-tweaks==1.4.1
Django==1.9.4 # via django-mptt, django-rest-swagger
djangorestframework==3.3.2
MySQL-python==1.2.5
Pillow==3.1.1
pytz==2015.7
PyYAML==3.11 # via django-rest-swagger
uWSGI==2.0.12
}}}
It comes up when building with Docker `FROM python:2.7` and
`python:2.7.11` images.
I can't share code, because it's proprietary, but it would be too big to
show anyway.
--
Ticket URL: <https://code.djangoproject.com/ticket/26409>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.bb91366c00ee7636a0561e43da4d2563%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.