Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: TypeError: unsupported operand type(s) for -: 'tuple' and 'tuple'

Reply
Thread Tools

Re: TypeError: unsupported operand type(s) for -: 'tuple' and 'tuple'

 
 
Jay Parlar
Guest
Posts: n/a
 
      03-17-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.square Counter),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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TypeError: unsupported operand type(s) for -: 'Decimal' and 'Decimal'. Why? Gilbert Fine Python 8 08-01-2007 01:58 AM
unsupported operand type(s) for ^: 'float' and 'float' Florian Lindner Python 1 06-15-2007 01:39 PM
Python interpreter error: unsupported operand type(s) for -: 'tuple' and 'int' Rakesh Python 3 03-30-2005 02:36 PM
Re: TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' Brett C. Python 2 08-30-2004 10:25 PM
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' Martin Koekenberg Python 3 08-26-2004 12:04 PM



Advertisments