Hi,
On Sun, Mar 22, 2015 at 02:03:31AM +0530, Akshita Jha wrote:
> I have sent a patch fixing the above mentioned unicode error in tasks.py
> for debian-med.
>
> The error was due to characters present in the 'long description' of some
> dependencies in the 'unofficial' and 'prospective' packages. Also, there
> were some 'authors' names in the dependencies of 'wnpp' package that had
> the same issue. I wrote a try-except block in blendstasktools.py which
> encodes these characters for 'xhtml' rendering.
Sounds very plausible.
> Now, there are no zero sized html files in /srv/
> blends.debian.org/www/med/tasks.
I tested it and can confirm that no zero size tasks files are created
any more. However, there is some issue left since the logfile keeps on
listing errors:
Traceback (most recent call last):
File "./tasks.py", line 181, in <module>
print >> f, template.generate(**data).render('xhtml')
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 1274: ordinal not in range(128)
> Can you please go through the patch and let me know in case of any issues.
I commited it and tested it locally. While the created files are
non-zero only three languages are created (en, cs, da). I guess the
problem starts with 'de' which comes alphabethically next and contains
non-ASCII characters typically. Your observation that the codes behave
differently when the text comes from UDD and from the tasks files is
what I mean that it is probably not possible to convert the whole
resulting data before feeding them to Genshi.
Attachment:
med_tasks_html.out
Description: Binary data