Python Poetry Index Error – list index out of range

You run poetry and get this (undescriptive) error message.

[IndexError]
list index out of range

So far I’ve identified two things that you need to check.

  1. Credentials: If you are installing packages from a private repository, make sure poetry credentials are right.
  2. Presence of all required files in local packages: If you are installing a package from local files, make sure all files mentioned in the packages section of its pyproject.toml file are present. (I mostly got this error while building on Docker when forgetting to add them all in the Dockerfile.

Posted in IT

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.