TypeError: unsupported operand type(s) for -: 'tuple' and 'tuple'
Jay Parlar
jparlar at cogeco.ca
Thu Mar 16 21:58:13 EST 2006
On Mar 16, 2006, at 3:14 PM, Peter Bismuti wrote:
> Can anyone explain this error message?
>
> Traceback (most recent call last):
> File "/acct/pjb9508/RAT/Scripts/PyQt/RatDialog.py", line 30, in
> NewClipButton_clicked
>
> self.rat.planeClip(self.o,"SQUARE"+str(self.squareCounter),width,origin
> )
> File "/acct/pjb9508/RAT/Scripts/PyQt/rat.py", line 12, in planeClip
> plane1[1] = origin[1]-width
> TypeError: unsupported operand type(s) for -: 'tuple' and 'tuple'
>
>
It looks like origin[1] and 'width' are both tuples. Substraction is
not defined on tuples. That's what the error message is saying at
least:
"TypeError: unsupported operand type(s) for -:" -This means that the
'-' operator received some bad types, types it doesn't know how to work
with
"'tuple' and 'tuple'" - This means the two types it received were both
tuples.
Jay P.
More information about the Python-list
mailing list