InfiniteMonkey has asked for the wisdom of the Perl Monks concerning the following question:

I'm having some code failing with a "list index out of range" message (with no attending line number info). I can't see anything in my code that should be generating such an error. Any ideas of anything that might be doing that?

Replies are listed 'Best First'.
Re: list index out of range (pythong)
by Anonymous Monk on Oct 29, 2014 at 01:33 UTC
      Thank you so much. That's actually really helpful :)
Re: list index out of range
by boftx (Deacon) on Oct 29, 2014 at 01:16 UTC

    A minimal code example that demonstrates the problem would help. We can see anything in your code, either, without it.

    You must always remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.

      Often that would be a fair comment. However the OP didn't ask "fix this code", but "what could cause this error". As it happens I know the context for this question and showing the code is not practical. The error is being generated in called code that includes 3rd party modules and there may be thousands of lines of code involved.

      Update Oh, and the failure depends on transient external conditions that are somewhat unknown and not easy to reproduce.

      Update and just to be clear, the script in question is Perl, but it runs a Python script that generates the error. OP and I couldn't figure out how Perl could be generating the error.

      Perl is the programming world's equivalent of English