[Tutor] cheetah is extremely hard to debug -error messages are non indicative TypeError: cannotconcatenate 'str' and 'int' objects

Alan Gauld alan.gauld at btinternet.com
Thu May 14 23:00:15 CEST 2009


<mobiledreamers at gmail.com> wrote

> How do i find which variable has error in these error messages?
>
> *Nonetype  object is unsubscriptable*

You need to send the entire error message, the last line is not
much good without the context. But you should see a line in
the traceback where a subscript aka indexing) operation is
being used. Python says that object is not subscriptable.

> else:return web.render('searchesnew.html')
>  File "/home/mark/work/common/web/cheetah.py", line 103, in render
>    return str(compiled_tmpl)
>  File
> "/usr/lib/python2.5/site-packages/Cheetah-2.0.1-py2.5-linux-i686.egg/Cheetah/Template.py",
> line 982, in __str__
>    def __str__(self): return getattr(self, mainMethName)()
>  File "<string>", line 323, in respond
> *TypeError: cannot concatenate 'str' and 'int' objects*

No idea about this bit. Is it a single error or a group of them?
If a group you need to send the complete message for each error.

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/ 




More information about the Tutor mailing list