Opened 10 years ago

Closed 10 years ago

#23119 closed Bug (duplicate)

IndexError: list index out of range (empty choices iterable)

Reported by: anonymous Owned by: nobody
Component: Uncategorized Version: 1.7-rc-2
Severity: Release blocker Keywords:
Cc: lemuelf@…, cmawebsite@…, Jcuotpc@…, areski@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I have just installed django 1.7rc2. When trying to run the development server with manage.py I get the following error:

TypeError: Error when calling the metaclass bases
    'itertools.tee' object has no attribute '__getitem__'    

Full traceback at: https://dpaste.de/8JS9.

Django 1.7rc1 works perfectly well.

Change History (14)

comment:1 by Baptiste Mispelon, 10 years ago

Resolution: duplicate
Status: newclosed

Hi,

This seems like a duplicate of #23112.
Can you confirm and reopen this ticket if that's not the case?

Thanks.

comment:2 by anonymous, 10 years ago

Resolution: duplicate
Status: closednew

comment:3 by Lemuel Formacil, 10 years ago

Cc: lemuelf@… added

comment:4 by Lemuel Formacil, 10 years ago

I have the same issue (similar traceback as the one in the ticket description; triggered by the same 3rd party library) but after using the branch in https://github.com/django/django/pull/2990 the development server worked for me. Let me know if there's any info I can add.

comment:5 by Collin Anderson, 10 years ago

Good catch. Your new traceback actually shows a different error (IndexError: list index out of range) that happens if the iterable is empty, which is fine on 1.6.

field = models.CharField(choices=(x for x in []), blank=True, max_length=1)

I've commented on the first ticket. https://code.djangoproject.com/ticket/23112#comment:16

Version 1, edited 10 years ago by Collin Anderson (previous) (next) (diff)

comment:6 by Collin Anderson, 10 years ago

Cc: cmawebsite@… added

comment:7 by Collin Anderson, 10 years ago

Summary: itertools.tee' object has no attribute '__getitem__' after upgraded to Django 1.7rc2IndexError: list index out of range (empty choices iterable)

comment:8 by Collin Anderson, 10 years ago

Severity: NormalRelease blocker

comment:9 by Julian C, 10 years ago

Cc: Jcuotpc@… added

comment:10 by Areski Belaid, 10 years ago

See the last commit that solve ticket #23112 (https://github.com/django/django/pull/2990), it should fix this issue too.

comment:11 by Areski Belaid, 10 years ago

Cc: areski@… added

comment:12 by anonymous, 10 years ago

The last commit that solved ticket #23112 (​https://github.com/django/django/pull/2990) fixed the issue for me, too.

comment:13 by Areski Belaid, 10 years ago

I think we could close this ticket and mark it as duplicate

comment:14 by Collin Anderson, 10 years ago

Resolution: duplicate
Status: newclosed

I agree.

Note: See TracTickets for help on using tickets.
Back to Top