TypeError: unsubscriptable object
Laszlo Nagy
gandalf at designaproduct.biz
Fri Jun 9 14:47:17 EDT 2006
k.retheesh at gmail.com írta:
> So wat should I do ??
>
You should do this:
print type(Function),type(Description)
raise SystemExit
Instead of this:
print template % (ID, IID, Function[:10], Description[:10],ErrorNumber, StatusCD)
Then probably you will see:
<type 'int'> <type 'int'>
instead of
<type 'str'> <type 'str'>
or something similar. (Of course in your case, it can be 'float instead of list' or 'dictionary instead of tuple' etc.)
Then you should debug your program and find out why the 'Function' and 'Description' objects are not string but int.
Laszlo
More information about the Python-list
mailing list