Bugs item #1007329, was opened at 2004-08-11 11:43
Message generated for change (Comment added) made by gsbarbieri
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=446895&aid=1007329&group_id=46652

Category: plugins
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Stéphane Lavirotte (lavirott)
Assigned to: Nobody/Anonymous (nobody)
Summary: Problem with Lcd plugins

Initial Comment:
Bug in lcd plugins loading at freevo starting

failed to load plugin lcd
start 'freevo plugins -l' to get a list of plugins
Traceback (most recent call last):
  File "/usr/local/src/freevo-1.5.0/src/plugin.py", line 
572, in __load_plugin__

    p = eval(object)()
  File "/usr/local/src/freevo-1.5.0/src/plugins/lcd.py", line 
708, in __init__
    if val: param = param % eval( val )
UnicodeDecodeError: 'ascii' codec can't decode byte 
0xfb in position 15: ordinal not in range(128)

This bug appears not a long time ago, but I can't say 
when. I noticed it with my last install too (1.5.0-rc2), 
and I upgraded to 1.5.0 to test

Actually my configuration (on a debian system):
      Freevo 1.5.0
      lcdproc 0.4.5-1

For the moment I commented the lines corresponding to 
the welcome splash screen on (lines 706-713), and 
every think works fine after.

Stéphane

----------------------------------------------------------------------

Comment By: Gustavo Sverzut Barbieri (gsbarbieri)
Date: 2004-08-11 17:45

Message:
Logged In: YES 
user_id=511989

I'm Brazilian and also notice some problems using the pt_BR
translation.

The problem is with python default encoding, ascii, which
doesn't accept any code greater than 128. If it was latin-1
(iso-8849-15) many problems would not appear... at least for
us, latin based speakers...

As I said you can fix those problems using String( text )
and Unicode( text ). The former convert from unicode objects
to str, the last convert from str to unicode.

You can test if an instance is str or unicode with:
if isinstance( object, str ):
   print "it's str"
elif isinstance( object, unicode ):
   print "it's unicode"

Also, unicode strings start with a "u", like: 
   unicode_text = u"some unicode text"

This may help you work around those bugs in freevo.

But please inform us so we can fix them.

I'm not the web developer, please post another bug with that
or send it to the list ([EMAIL PROTECTED]),
the response is quicker.

Gustavo

----------------------------------------------------------------------

Comment By: Stéphane Lavirotte (lavirott)
Date: 2004-08-11 16:11

Message:
Logged In: YES 
user_id=310665

Hello Gustavo,

I can't get the new revision of lcd.py, so I can't test your 
patch for the moment, but I made some other test. You are 
right.

I've got the following lines in my local.conf

# Set locale to french to have the right date format
import locale
locale.setlocale(locale.LC_ALL, "fr_FR")

If I replace fr_FR by en_US, the lcd plugins doesn't crash. So 
the problem is here. I'll try your patch as soon as possible.

At the same time, with fr_FR, I've got a problem with the 
freevo web plugin:
------------
/usr/local/src/freevo-1.5.0/src/www/htdocs/index.rpy, line 
110 in _render
108    fv.res += '<div id="contentmain">\n'
109
110    fv.res += '<br/><br/><h2>'+( _('Freevo Web Status as 
of %s') % 111        time.strftime('%B %d ' + config.TV_TIMEFORMAT, 
time.localtime()) ) +'</h2>'
Localsfv www.web_types.HTMLResource instance @ 
0x41ab58cc
 <www.web_types.HTMLResource instance at 0x41ab58cc> 

Globalstime <module 'time' from '/usr/lib/python2.3/lib-
dynload/time.so'> 
config <module 'config' from '/usr/local/src/freevo-
1.5.0/src/config.pyo'> 

exceptions.UnicodeDecodeError: 'ascii' codec can't decode 
byte 0xfb in position 2: ordinal not in range(128)
-----------
This is the same problem. Do I need to send another bug 
request ?

In fact, the problem is not recent, and will only appear during 
3 months: february (février in french), august (août) and 
december (décembre). It's hopefull that I'm in holidays in 
august ;)

Thanks for your quick answer

Stéphane

----------------------------------------------------------------------

Comment By: Gustavo Sverzut Barbieri (gsbarbieri)
Date: 2004-08-11 15:00

Message:
Logged In: YES 
user_id=511989

Hello Stéphane,

Try revision 1.20 from lcd.py, in CVS right now (confirm
it's version 1.20, anonymouse sf cvs may be delayed).

Maybe what was happening is your LC_ALL or LANG set to some
language where some un-wrapped string, maybe "Today is", is
translated to something that contains chars out of the ASCII
range (0-127).

My patch try to wrap every string with String(). If you find
another bug like this (UnicodeError) in freevo, try to wrap
with String() or Unicode(), depending on the context.

Keep reporting errors!

Thanks,

Gustavo



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=446895&aid=1007329&group_id=46652


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to