KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums KX Academy Fundamentals Capstone 5.2 length error Reply To: Fundamentals Capstone 5.2 length error

  • megan_mcp

    Administrator
    March 26, 2024 at 10:17 am

    Hi @Kenan

    The problem lies with your last bit of code ‘edge > avgEdgePerOption[avgEdge]’.
    You are only able to index into a dictionary, not a table. So as avgEdgePerOption returns as a table, when you run ‘avgEdgePerOption[avgEdge]’ it returns nothing (screenshot below).

    This is what causes the length error as edge is a list and avgEdgePerOption[`avgEdge] is an empty dictionary.

    Hope this helps!

    Thanks,

    Megan🙂