[reportlab-users] Minor bug in test suit test_platypus_pto.py

Stuart, Robert Robert.Stuart at granadamedia.com
Thu Mar 10 08:33:30 EST 2005


>> This parser is on deathrow anyway so perhaps we have to bite the XML bullet :(

>From the error, I thought you had bitten that bullet ... "xml parser error (garbage in start tag) in paragraph beginning" - see below.

Robert Stuart

Trace snippet:

E
======================================================================
ERROR: test0 (__main__.BreakingTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "F:\Python\reportlab_1_20\reportlab\test\test_platypus_pto.py", line 153, in test0
    _breakingTestCase(self)
{snip}
  File "F:\reportlab\reportlab_1_20\reportlab\platypus\paragraph.py", line 403, in _setup
xml parser error (garbage in start tag) in paragraph beginning
'<para color=Color(0,0,0)>Inner'

----------------------------------------------------------------------
Ran 1 test in 0.171s

FAILED (errors=1)



-----Original Message-----
From: Robin Becker [mailto:robin at reportlab.com]
Sent: 10 March 2005 13:03
To: Support list for users of Reportlab software
Subject: Re: [reportlab-users] Minor bug in test suit
test_platypus_pto.py


Stuart, Robert wrote:
> Minor bug in test suit test_platypus_pto.py
> 
> Line 49 reads:
> 	return Paragraph('<para color=%s>%s</para>' % (c,text),style)
> 
> Should read:
> 	return Paragraph('<para color="%s">%s</para>' % (c,text),style)
> 
> Note the double quotes on the color.
> Without the double quotes, the string "Color(0,0,0)" generates an error.  
> 
> ?Presumably, a named color (e.g. Dark Green) would also generate an error?
> 
> My apologies if this has been reported before.
> 
> Robert Stuart
> 
> ********************************************************************** 
> This email and any files transmitted are confidential and intended 
> solely for the use of the individual or entity to which they are 
> addressed. If you have received this email in error, please notify 
> postmaster at itv.com 
> 
> Thank you.
> **********************************************************************
> 
Interesting. The back end parser is supposed to be sgml compliant so we 
shouldn't need the ".  I suppose something in Color(0,0,0) ends the attribute 
value prematurely.

This parser is on deathrow anyway so perhaps we have to bite the XML bullet :(
-- 
Robin Becker
_______________________________________________
reportlab-users mailing list
reportlab-users at reportlab.com
http://two.pairlist.net/mailman/listinfo/reportlab-users
********************************************************************** 
Please visit the official ITV website at www.itv.com
for the latest company news.

This email and any files transmitted are confidential and intended 
solely for the use of the individual or entity to which they are 
addressed. If you have received this email in error, please notify 
postmaster at itv.com 

Thank you.
**********************************************************************
********************************************************************** 
This email and any files transmitted are confidential and intended 
solely for the use of the individual or entity to which they are 
addressed. If you have received this email in error, please notify 
postmaster at itv.com 

Thank you.
**********************************************************************


More information about the reportlab-users mailing list