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

Discussion in 'Python' started by Jay Parlar, Mar 17, 2006.

  1. Jay Parlar

    Jay Parlar Guest

    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.
    Jay Parlar, Mar 17, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Martin Koekenberg
    Replies:
    3
    Views:
    1,287
    Martin Koekenberg
    Aug 26, 2004
  2. Brett C.
    Replies:
    2
    Views:
    2,829
    Martin Koekenberg
    Aug 30, 2004
  3. Gilbert Fine
    Replies:
    8
    Views:
    884
    Zentrader
    Aug 1, 2007
  4. Íßêïò Ãêñ33ê
    Replies:
    14
    Views:
    1,362
    Íßêïò Ãêñ33ê
    May 28, 2013
  5. Cameron Simpson
    Replies:
    0
    Views:
    119
    Cameron Simpson
    May 27, 2013
Loading...

Share This Page