[reportlab-users] XML Parser Error in Paragraph.py
Marc Stober
reportlab-users@reportlab.com
Tue, 7 Jan 2003 12:22:46 -0500
I received the following error using ReportLab:
File "C:\PYTHON22\reportlab\platypus\paragraph.py", line 365, in _setup
raise "xml parser error (%s) in paragraph beginning\n'%s'"\
TypeError: exceptions must be strings, classes, or instances, not unicode
It seems that the underlying error is not being shown because the XML doc is
in Unicode. Would it be possible to change the lines in paragraph.py to
include str() as follows:
raise str("xml parser error (%s) in paragraph
beginning\n'%s'" \
% (_parser.errors[0],text[:min(30,len(text))]) )
This correctly gives the underlying error on my system (Python 2.2).
Thanks!
Marc Stober
mstober@dalbar.com