This is just a little hack to get some more detailed debug informations with kid templates. For example the result should look like this: ExpatError: in /my/working/directory/master.kid: mismatched tag: line 69, column 28 (tag: http://www.w3.org/1999/xhtml}img) The line number and the column are still wrong. Please let me know your improvements! jabber and mail: dino ankaria de "install" Just replace the “feed” function in kid's "pull.py": def feed(self, data): try: self._parser.Parse(data, 0) except xml.parsers.expat.ExpatError, e: print 'text' tmp = [] for i in self._queue: if i[0] == START: tmp.insert(0, i[1][0]) if i[0] == END: if tmp[0] == i[1]: tmp.remove(i[1]) else: break if len(tmp) != 0: e.args = ('in %s: %s (tag: %s)' % \ (self._filename, e.args[0],str(tmp[0])),) raise e