[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [GSoC] Profiling SQL query (Was: [GSoC] Reg Blends Web Sentinel)



Hi,

On Mon, Mar 23, 2015 at 1:23 AM, Andreas Tille <andreas@an3as.eu> wrote:
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)


I don't get any error on running  './tasks.py debian-med '.
 
> 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.

 
When I run tasks.py for debian-med, html files for all the languages are created and none of them have size 0. PFA the output html files that are created after running ./tasks.py debian-med.

Can you please help me recreate this error. 


-- 
Regards,
Akshita Jha

Attachment: med_tasks_html.out
Description: Binary data


Reply to: