[reportlab-users] xml parser error (invalid attribute name class) in paragraph
Jon.Reinsch
jon.reinsch at noaa.gov
Wed Dec 12 13:09:44 EST 2012
I developed code using ReportLab 2.5, but after upgrading to 2.6, it
fails. An extremely stripped-down version is:
from reportlab.lib.styles import ParagraphStyle
from reportlab.platypus import *
classrowstyle =
ParagraphStyle(name="classrowstyle",fontSize=8,fontName="Helvetica",leading=11)
row1 = '<span class="protected">simplified</span>'
details = Paragraph(row1,classrowstyle)
The error is as follows:
Traceback (most recent call last):
File "C:\MiniESI\bugtest.py", line 6, in <module>
details = Paragraph(row1,classrowstyle)
File "C:\Python27\lib\site-packages\reportlab\platypus\paragraph.py",
line 919, in __init__
self._setup(text, style, bulletText or
getattr(style,'bulletText',None), frags, cleanBlockQuoted
Text)
File "C:\Python27\lib\site-packages\reportlab\platypus\paragraph.py",
line 937, in _setup
% (_parser.errors[0],text[:min(30,len(text))]))
ValueError: xml parser error (invalid attribute name class) in paragraph
beginning
'<span class="protected">simpli'
As I said, my code ran fine in ReportLab 2.5. Thanks for any advice you
can offer.
--
Jon Reinsch
National Oceanic and Atmospheric Administration, Seattle
More information about the reportlab-users
mailing list