Help with this error

1 view
Skip to first unread message

redneck

unread,
Nov 2, 2005, 10:59:34 PM11/2/05
to TurboGears
I am progessing thru the wiki tut, I have just created the edit page
link with
"<p><a href="/edit?pagename=${pagename}">Add a page? </a></p>"
I click on the link and get this cherrypy message

500 Internal error

Server got itself in trouble

Traceback (most recent call last):
File
"/usr/local/lib/python2.4/site-packages/CherryPy-2.1.0_rc2-py2.4.egg/cherrypy/_cphttptools.py",
line 271, in run
main()
File
"/usr/local/lib/python2.4/site-packages/CherryPy-2.1.0_rc2-py2.4.egg/cherrypy/_cphttptools.py",
line 502, in main
body = page_handler(*args, **cherrypy.request.paramMap)
File
"/usr/local/lib/python2.4/site-packages/TurboGears-0.8a3-py2.4.egg/turbogears/controllers.py",
line 122, in newfunc
return controllers._process_output(tg_format, output, html)
File
"/usr/local/lib/python2.4/site-packages/TurboGears-0.8a3-py2.4.egg/turbogears/controllers.py",
line 38, in _process_output
output = view.render(output, tg_format, template=template)
File
"/usr/local/lib/python2.4/site-packages/TurboGears-0.8a3-py2.4.egg/turbogears/view.py",
line 99, in render
return t.serialize(encoding="utf-8", output=format,
fragment=fragment)
File
"/usr/local/lib/python2.4/site-packages/kid-0.7adev_r186-py2.4.egg/kid/__init__.py",
line 231, in serialize
return serializer.serialize(self, encoding, fragment)
File
"/usr/local/lib/python2.4/site-packages/kid-0.7adev_r186-py2.4.egg/kid/serialization.py",
line 47, in serialize
text = list(self.generate(stream, encoding, fragment))
File
"/usr/local/lib/python2.4/site-packages/kid-0.7adev_r186-py2.4.egg/kid/serialization.py",
line 301, in generate
for ev, item in self.apply_filters(stream):
File
"/usr/local/lib/python2.4/site-packages/kid-0.7adev_r186-py2.4.egg/kid/serialization.py",
line 73, in balancing_filter
for ev, item in stream:
File
"/usr/local/lib/python2.4/site-packages/kid-0.7adev_r186-py2.4.egg/kid/pull.py",
line 179, in _coalesce
for ev, item in stream:
File
"/usr/local/lib/python2.4/site-packages/kid-0.7adev_r186-py2.4.egg/kid/filter.py",
line 21, in transform_filter
for ev, item in apply_matches(stream, template, templates,
apply_func):
File
"/usr/local/lib/python2.4/site-packages/kid-0.7adev_r186-py2.4.egg/kid/filter.py",
line 31, in apply_matches
item = stream.expand()
File
"/usr/local/lib/python2.4/site-packages/kid-0.7adev_r186-py2.4.egg/kid/pull.py",
line 91, in expand
stack[-1].append(current)
TypeError: append() argument 1 must be Element, not instance

Any Ideas? Any help would be great. Thanks

Kevin Dangoor

unread,
Nov 3, 2005, 9:14:37 AM11/3/05
to turbo...@googlegroups.com
Hi,

It looks like there's a problem with one of your templates. Can you
email your master.kid and edit.kid?

Kevin

Kevin Dangoor

unread,
Nov 4, 2005, 10:10:55 AM11/4/05
to turbo...@googlegroups.com
On 11/2/05, redneck <redneck...@dodo.com.au> wrote:
> File
> "/usr/local/lib/python2.4/site-packages/kid-0.7adev_r186-py2.4.egg/kid/pull.py",
> line 91, in expand
> stack[-1].append(current)
> TypeError: append() argument 1 must be Element, not instance

Ahh... I think I see the problem. There's a bug in Kid which causes it
to fail if the master template has <!-- --> comments in it.

Kevin
Reply all
Reply to author
Forward
0 new messages