dzeban / batti-gtk

Automatically exported from code.google.com/p/batti-gtk
GNU General Public License v2.0
0 stars 0 forks source link

Battery.py % error line 88. ValueError: unsupported format character '\' (0x5c) at index 18 #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
1. build the package (0.3.5) (via aur in arch)
2. after I start batti, I get an python error
...
File "/usr/lib/python2.6/site-packages/batti/Battery.py", line 88, in set_value
    tooltip = _("Battery Level: %s%\% \nApproximately %s remaining") %
(info._percentage, self._str_time(info._time))
    ValueError: unsupported format character '\' (0x5c) at index 18

I'm not a programmer so I could be wrong, but me thinks it's a typo on line
88 in Battery.py
should be '%s%%' instead of '%s%\%'

thanx for this great little app

Original issue reported on code.google.com by jus...@gmail.com on 14 May 2010 at 7:40

GoogleCodeExporter commented 8 years ago
You are right. It should be fixed in 0.3.6 now. 
Thank you very much for reporting. Glad to see somebody uses it ;)

Original comment by arthapex on 15 May 2010 at 9:13

GoogleCodeExporter commented 8 years ago
you're welcome. it fits nice in my tint panel.
but hmmm, the new version contains the same sort of bug:
one '%' to many in line 88
%s%%% should be %s%%

thanx for the quick response

Original comment by jus...@gmail.com on 15 May 2010 at 4:00

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
well I thought everything fixed itself last night, but the error is back again:

File "/usr/lib/python2.6/site-packages/batti/Battery.py", line 88, in set_value
    tooltip = _("Battery Level: %s%%% \nApproximately %s remaining") %
(info._percentage, self._str_time(info._time))
ValueError: unsupported format character '
' (0xa) at index 21

Original comment by jus...@gmail.com on 16 May 2010 at 7:29

GoogleCodeExporter commented 8 years ago
You are right. Don't know how I could miss that. 
Battery Level: %s%%% 
should be
Battery Level: %s%%

Could you fix that locally, and post if works for you. I'll make a package for 
that then.

Original comment by arthapex on 16 May 2010 at 9:06

GoogleCodeExporter commented 8 years ago
could you additionally/alternatively check out version 0.3.7?

Original comment by arthapex on 16 May 2010 at 4:58

GoogleCodeExporter commented 8 years ago
now testing 0.3.7....
it works
thank you

Original comment by jus...@gmail.com on 16 May 2010 at 6:39

GoogleCodeExporter commented 8 years ago
wonderful. if you don't find anything during the next couple of days, I'll mark 
this as fixed.
Thanks.

Original comment by arthapex on 16 May 2010 at 7:25

GoogleCodeExporter commented 8 years ago
Marked as fixed.

Original comment by arthapex on 22 May 2010 at 10:22