maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Pybattery - battery statusbar applet with candies (https://talk.maemo.org/showthread.php?t=24905)

Nelson L. Squeeko 2009-10-21 17:49

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 354245)
Allright :)
It was the thing I thought about.
1. Purge AP
2. Remove dir section of AP in /etc/gconf/gconf.xml.defaults/%gconf-tree.xml
It starts with <dir name="advanced-power"> remove node and subnodes.
3. Install AP again.

I'm not too advanced in Xterm. To purge AP, where do I put this code
Code:

apt-get --purge remove
Do I navigate to a specific directory?

Saturn 2009-10-21 18:33

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by Nelson L. Squeeko (Post 354295)
I'm not too advanced in Xterm. To purge AP, where do I put this code
Code:

apt-get --purge remove
Do I navigate to a specific directory?

Hi, open xterm, get root and enter

Code:

apt-get --purge remove advanced-power advanced-power-monitor

Nelson L. Squeeko 2009-10-21 18:52

Re: Pybattery - battery statusbar applet with candies
 
That worked. Thanks. Not sure if it made a difference, but when I updated via the application manager the first one that updated was the one that required the restart. I restarted after this and then updated the other one after the reboot. Just one idea I had for a possible reason for the update not working.

Saturn 2009-10-21 19:11

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 354245)
Allright :)
It was the thing I thought about.
1. Purge AP
2. Remove dir section of AP in /etc/gconf/gconf.xml.defaults/%gconf-tree.xml
It starts with <dir name="advanced-power"> remove node and subnodes.
3. Install AP again.

Did all steps with a reboot after step 2 and again after 3.
Still it doesn't show in the statusbar and it is enabled in the control panel.

When it boots seems like the desktop crashes but can't be sure about that.

I will try to run your profiler later if I manage to find some time..

PS: saw also this in the terminal when did the apmonitor restart.

Code:

ERROR:dbus.service:Unable to append (None,) to message with signature v: <type 'exceptions.TypeError'>: Don't know how which D-Bus type to use to encode type "NoneType"

tso 2009-10-21 19:40

Re: Pybattery - battery statusbar applet with candies
 
last time i tried the purge option, i got the message that it was unavailable...

Fionn 2009-10-21 20:37

Re: Pybattery - battery statusbar applet with candies
 
Hmm.......... got the update notification that updates were available for this last night.

So should I hold off updating or.............?

412b 2009-10-21 20:50

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by Fionn (Post 354547)
Hmm.......... got the update notification that updates were available for this last night.

So should I hold off updating or.............?

On the one hand, why not... Build 3 works as supposed. If you have build 2 or older, upgrade. If you have n810, upgrade.
On the other hand, I'm very interested in Saturn's test.py output...

Saturn 2009-10-21 21:03

Re: Pybattery - battery statusbar applet with candies
 
Hi,

hope it's useful..

Code:

Nokia-N800-23-14:/usr/lib/hildon-desktop# python test.py
Traceback (most recent call last):
  File "test.py", line 14, in <module>
    cProfile.run('main()', 'main_prof')
  File "/usr/lib/python2.5/cProfile.py", line 29, in run
  File "/usr/lib/python2.5/cProfile.py", line 135, in run
  File "/usr/lib/python2.5/cProfile.py", line 140, in runctx
  File "<string>", line 1, in <module>
  File "test.py", line 6, in main
    p = advanced_power()
  File "ap/advanced_power.py", line 148, in __init__
  File "ap/advanced_power.py", line 319, in load_theme
  File "ap/advanced_power.py", line 358, in set_custom_icon_theme
  File "ap/advanced_power.py", line 362, in update_button_state
  File "ap/advanced_power.py", line 306, in redraw_button
UnboundLocalError: local variable 'new_button' referenced before assignment
Nokia-N800-23-14:/usr/lib/hildon-desktop#

EDIT::

rerun it and now got a longer message:

Code:

Nokia-N800-23-14:/usr/lib/hildon-desktop# python test.py
/usr/lib/hildon-desktop/advanced_power.py:1020: GtkWarning: Attempting to add a widget with type GtkImage to a container of type GtkAlignment, but the widget is already inside a container of type GtkAlignment, the GTK+ FAQ at http://www.gtk.org/faq/ explains how to reparent a widget.
Traceback (most recent call last):
  File "test.py", line 14, in <module>
    cProfile.run('main()', 'main_prof')
  File "/usr/lib/python2.5/cProfile.py", line 29, in run
  File "/usr/lib/python2.5/cProfile.py", line 135, in run
  File "/usr/lib/python2.5/cProfile.py", line 140, in runctx
  File "<string>", line 1, in <module>
  File "test.py", line 6, in main
    p = advanced_power()
  File "ap/advanced_power.py", line 151, in __init__
  File "ap/advanced_power.py", line 658, in create_menu
  File "ap/advanced_power.py", line 588, in _add_upd_item
  File "ap/advanced_power.py", line 469, in get_os_version
  File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 607, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/service.py", line 739, in _message_cb
    _method_reply_return(connection, message, method_name, signature, *retval)
  File "/usr/lib/python2.5/site-packages/dbus/service.py", line 252, in _method_reply_return
    reply.append(signature=signature, *retval)
TypeError: Don't know how which D-Bus type to use to encode type "NoneType"

Nokia-N800-23-14:/usr/lib/hildon-desktop#


412b 2009-10-21 22:25

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by Saturn (Post 354572)
hope it's useful.

It really is. First error is produced by backporting from new branch and is now fixed.
Can you also provide APM output in the second situation?
Because it is also APM related.

Saturn 2009-10-21 22:29

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 354682)
It really is. First error is produced by backporting from new branch and is now fixed.
Can you also provide APM output in the second situation?
Because it is also APM related.

How do I do that?

I have all still open..

EDIT::

is this what you needed?

Code:

Nokia-N800-23-14:/etc/init.d# ./apmonitord restart
Advanced Power Monitor Daemon: apmonitord
Restarting...
Nokia-N800-23-14:/etc/init.d# Loading modules...
LOADED: TotalRAM
LOADED: CPUFrequency
LOADED: Uptime
LOADED: CPUGovernor
LOADED: Temperature
LOADED: TotalSwap
LOADED: FreeSwap
LOADED: Diskspace
LOADED: CPUGovernors
LOADED: FreeRAM
FAILED: OSVersion
FAILED: LightSensor
done

Loading wrappers...
FAILED: SmartQx
LOADED: Nokia's BME
LOADED: Dummy
FAILED: BME Free
USING:  Nokia's BME

LOADED: HAL USB
LOADED: Dummy
USING:  HAL USB

LOADED: Dummy
LOADED: Nokia's MCE
FAILED: Powerlaunch
USING:  Nokia's MCE

LOADED: Dummy
LOADED: BlueZ
USING:  BlueZ

done

ERROR:dbus.service:Unable to append (None,) to message with signature v: <type 'exceptions.TypeError'>: Don't know how which D-Bus type to use to encode type "NoneType"

Nokia-N800-23-14:/etc/init.d#



All times are GMT. The time now is 14:53.

vBulletin® Version 3.8.8