Dec-11-2019, 08:03 PM
The key of your dictionary is all strings.
Your array
That means you are trying to access the key - of which its type is a string - using an int, so it doesn't find anything and throws an error.
What you want is:
Your array
right_hand_numbers
is full of integers.That means you are trying to access the key - of which its type is a string - using an int, so it doesn't find anything and throws an error.
What you want is:
diagramCanvas.create_text(10 + dotposition * 5, dotYposition[str(dotposition)], text='.')or optionally, make everything in
right_hand_numbers
a string.