This is someting that appears to have been troublesome to others too,
so I wondered whether there are definite plans to improve the issues it
raises. I just started to port an existing web app, the one from
Chapter 18 of "Python Web Programming", to help me learn TurboGears in
a way that would explain it clearly to people who'd read the book.

Unfortunately this initially (until I can start making proper use of
Kid) required me to insert various generated chunks of HTML into Kid
templates using the ${XML(...)} feature. Alas, when the HTML isn't
properly-formed I get a huge traceback which ends with the information
that there's a problem at line 1, column 41. But it doesn't show me the
XML source it's complaining about. As of this writing I have spent
about an hour looking for an XML problem and I'm about ready to give
up.

Are there options I can set to improve the debug information I get
back? If not, are their plans to improve the XML diagnostics? I append
the actual traceback I am dealing with just as an example of its
general uselessness.

regards
 Steve

Page handler: <bound method Root.index of <gs.controllers.Root object
at 0x01573530>>
Traceback (most recent call last):
  File
"c:\python24\lib\site-packages\CherryPy-2.2.1-py2.4.egg\cherrypy\_cphttptools.py",
line 105, in _run
    self.main()
  File
"c:\python24\lib\site-packages\CherryPy-2.2.1-py2.4.egg\cherrypy\_cphttptools.py",
line 254, in main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in index
  File
"c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\controllers.py",
line 326, in expose
    output = database.run_with_transaction(
  File "<string>", line 5, in run_with_transaction
  File
"c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\database.py",
line 246, in so_rwt
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File
"c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\controllers.py",
line 343, in <lambda>
    mapping, fragment, args, kw)))
  File
"c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\controllers.py",
line 380, in _execute_func
    return _process_output(output, template, format, content_type,
mapping, fragment)
  File
"c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\controllers.py",
line 74, in _process_output
    fragment=fragment)
  File
"c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\view\base.py",
line 131, in render
    return engine.render(**kw)
  File
"c:\python24\lib\site-packages\TurboKid-0.9.8-py2.4.egg\turbokid\kidsupport.py",
line 156, in render
    return t.serialize(encoding=self.defaultencoding, output=format,
fragment=fragment)
  File
"c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\__init__.py",
line 236, in serialize
    return serializer.serialize(self, encoding, fragment)
  File
"c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\serialization.py",
line 51, in serialize
    text = list(self.generate(stream, encoding, fragment))
  File
"c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\serialization.py",
line 329, in generate
    for ev, item in self.apply_filters(stream):
  File "c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py",
line 210, in _coalesce
    for ev, item in stream:
  File
"c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\filter.py", line
21, in transform_filter
    for ev, item in apply_matches(stream, template, templates,
apply_func):
  File
"c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\filter.py", line
31, in apply_matches
    item = stream.expand()
  File "c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py",
line 99, in expand
    for ev, item in self._iter:
  File "c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py",
line 168, in _track
    for p in stream:
  File "c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py",
line 210, in _coalesce
    for ev, item in stream:
  File "C:\Steve\Projects\PyTeach\gs\templates\index.py", line 136, in
_pull
  File "c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py",
line 123, in strip
    for (ev, item) in self._iter:
  File "c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py",
line 168, in _track
    for p in stream:
  File "c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py",
line 210, in _coalesce
    for ev, item in stream:
  File "c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py",
line 374, in __iter__
    for (ev, stuff) in self._expat_stream():
  File "c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py",
line 346, in _expat_stream
    feed(data)
  File "c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py",
line 414, in feed
    raise e
ExpatError: not well-formed (invalid token): line 1, column 41

Of course, why didn't I *see* that!?!?!?!?!?!?!?!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to