Am 25.01.2011 um 19:10 schrieb denysonique:

Hi,
I am trying to follow this tutorial 
http://turbogears.org/2.1/docs/main/Extensions/Crud/index.html
, but unfortunately I get this error when trying to access the view:

File '/usr/lib/python2.6/site-packages/tgext.crud-0.3.8-py2.6.egg/
tgext/crud/templates/get_all.html', line 29 in <Expression
u"XML(tmpl_context.widget(value=value_list, action='../'+model.lower()
+'s.json'))">
 ${XML(tmpl_context.widget(value=value_list,
action='../'+model.lower()+'s.json'))}
File '/usr/lib/python2.6/site-packages/genshi/input.py', line 271 in
XML
 return Stream(list(XMLParser(StringIO(text))))
File '/usr/lib/python2.6/site-packages/genshi/core.py', line 272 in
_ensure
 event = stream.next()
File '/usr/lib/python2.6/site-packages/genshi/input.py', line 432 in
_coalesce
 for kind, data, pos in chain(stream, [(None, None, None)]):
File '/usr/lib/python2.6/site-packages/genshi/input.py', line 165 in
_generate
 raise ParseError(msg, self.filename, e.lineno, e.offset)
ParseError: not well-formed (invalid token): line 1, column 41

The code I have written for following the tutorial can be obtained
from here: http://88.198.98.195/tg-sprox-crud.tar.bz2

The error-message is pretty clear I'd say - you have written malformed data into the text-variable.

But without showing that to us, we can't comment on that.

so what's the content of "text" in the expression "Stream(list(XMLParser(StringIO(text))))"

?
Diez

--
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?hl=en.

Reply via email to