TypeError: unsubscriptable object.
Mel Wilson
mwilson at the-wire.com
Fri May 21 19:22:25 EDT 2004
In article <494182a9.0405211340.49873a72 at posting.google.com>,
balaji at email.arizona.edu (Balaji) wrote:
>Hello Everybody...
>
>I have a problem..
[ ... ]
>----------------------------------------------
>I'm getting the following error TypeError: unsubscriptable object...
>Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "generation.py", line 175, in stackManagement
> self.stackManagement(expr.left)
> File "generation.py", line 176, in stackManagement
> self.stackManagement(expr.right)
> File "generation.py", line 199, in stackManagement
> self.a+= self.peekF()
> File "generation.py", line 168, in peekF
> rval= self.stackF[-1]
>-------------------------------------
>I 'm at my wit ends..
>
>Can anyone help...
Something has come unstuck. I would try wrapping
the failing statement:
try:
rval= self.stackF[-1]
except TypeError:
print "TypeError, self.stackF:", repr(self.stackF)
sys.exit (-1)
and see what comes out.
Regards. Mel.
More information about the Python-list
mailing list