Page MenuHome

mathutils.Vector - incorrect error message for bad type assignments
Closed, ResolvedPublic

Description

The following code:

from mathutils import Vector
vector_a = Vector((0, 1, 2))

vector_a[0] = "Hello World"

incorrectly reports a wrong type for the index:

TypeError: vector[index] = x: index argument not a number

but it's actually the value that is wrong.

If you try a proper value, but bad type as index, the following error is reported (correct):

vector_a[...] = 123

TypeError: vector indices must be integers, not ellipsis

Event Timeline

codemanx raised the priority of this task from to 90.
codemanx updated the task description. (Show Details)
codemanx edited a custom field.
codemanx added a subscriber: codemanx.
Campbell Barton (campbellbarton) changed the task status from Unknown Status to Resolved.Jan 30 2014, 6:46 AM

Closed by commit rBbd697dd4d7e3.