Re: Puzzling error msg.

Discussion in 'Python' started by Chris Angelico, Dec 4, 2012.

  1. On Tue, Dec 4, 2012 at 1:28 PM, Dave Angel <> wrote:
    > On 12/03/2012 03:33 PM, Chris Angelico wrote:
    >> <snip>
    >> Is it possible that the error actually came from further up (with a
    >> faulty line number) and was actually because communicate() somehow
    >> returned an empty list? That's the only place in the code quoted that
    >> I'm seeing indexing, but communicate() is supposed to return a tuple,
    >> not a list. ChrisA

    > Tuples can also be empty. Try j = () for example, and look at its type
    > and length.
    >
    > No idea if this is the problem, but just wanted to nitpick.


    They can, yes, but the error said *list* index out of range. That
    shouldn't happen off an empty tuple.

    ChrisA
     
    Chris Angelico, Dec 4, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steven D'Aprano

    Re: Puzzling error msg.

    Steven D'Aprano, Dec 3, 2012, in forum: Python
    Replies:
    0
    Views:
    173
    Steven D'Aprano
    Dec 3, 2012
  2. Ian Kelly

    Re: Puzzling error msg.

    Ian Kelly, Dec 3, 2012, in forum: Python
    Replies:
    0
    Views:
    206
    Ian Kelly
    Dec 3, 2012
  3. Chris Angelico

    Re: Puzzling error msg.

    Chris Angelico, Dec 3, 2012, in forum: Python
    Replies:
    0
    Views:
    200
    Chris Angelico
    Dec 3, 2012
  4. Dave Angel

    Re: Puzzling error msg.

    Dave Angel, Dec 4, 2012, in forum: Python
    Replies:
    0
    Views:
    161
    Dave Angel
    Dec 4, 2012
  5. Dave Angel

    Re: Puzzling error msg.

    Dave Angel, Dec 4, 2012, in forum: Python
    Replies:
    0
    Views:
    169
    Dave Angel
    Dec 4, 2012
Loading...

Share This Page