| View previous topic :: View next topic |
| Author |
Message |
DeadMonkey Tux's lil' helper


Joined: 19 Jul 2002 Posts: 80 Location: Sitting in a Chair
|
Posted: Sun Apr 03, 2005 1:55 am Post subject: adesklets and SystemMonitor adesklet... [solved] |
|
|
Hoping someone can lead me to a solution.
I found adesklets to use with XFCE4 and so far I love it. I have two modules running now without issue (weatherforecast and acpumon), but I can't get SystemMonitor to work for me.
This is the error I get after running:
| Code: |
./SystemMonitor-0.1.1
|
| Code: |
jjuiliano@thor SystemMonitor-0.1.1 $ ./SystemMonitor.py
Traceback (most recent call last):
File "./SystemMonitor.py", line 991, in ?
EventHandler(dirname(__file__)).pause()
File "./SystemMonitor.py", line 842, in __init__
adesklets.Events_handler.__init__(self)
File "/usr/lib/python2.4/site-packages/adesklets/events_handler.py", line 157, in __init__
self.ready()
File "./SystemMonitor.py", line 887, in ready
self.run_display()
File "./SystemMonitor.py", line 951, in run_display
meter.display()
File "./SystemMonitor.py", line 510, in display
self.update()
File "./SystemMonitor.py", line 536, in update
__krell_value, __text_value = self.getMeterValues()
File "./SystemMonitor.py", line 815, in getMeterValues
krell_value.append(float(partition_stats["used"])/partition_stats["size"])
ZeroDivisionError: float division
|
Checking the README shows it worked with Python-2.4, so I unmasked and compiled the newer version, and still no joy.
Can someone point me in the right direction as to how to solve this? Checking the adesklets forum I didn't see anything, and google didn't help either.
Thanks for any insight...
Last edited by DeadMonkey on Thu Apr 14, 2005 7:11 pm; edited 1 time in total |
|
| Back to top |
|
 |
Jerem Apprentice

Joined: 11 Jun 2004 Posts: 177
|
Posted: Sat Apr 09, 2005 4:37 pm Post subject: |
|
|
| Check the README more carefully. I think it also depends on something like libgrab and pythongrab... |
|
| Back to top |
|
 |
DeadMonkey Tux's lil' helper


Joined: 19 Jul 2002 Posts: 80 Location: Sitting in a Chair
|
Posted: Thu Apr 14, 2005 7:11 pm Post subject: |
|
|
You know I don't even remember getting an e-mail note saying you replied? Sorry I didn't look this up sooner.
Anyway, I did have libstatgrab and pystatgrab installed.
I think my problem was using the wrong switches with tar. Before I was using xvjpf and I just tried it today with just xvpf and so far it's working!
Thanks for your reply anyway.
J.R. |
|
| Back to top |
|
 |
Physaro n00b

Joined: 24 Nov 2003 Posts: 17
|
Posted: Tue Apr 19, 2005 5:53 pm Post subject: |
|
|
Hi,
this is not your fault. Its more or less a bug in the Script.
When you type mount, you will see s.th. like this this:
| Quote: |
/dev/hda2 on / type ext3 (rw,noatime,user_xattr)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev type ramfs (rw)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/bus/usb type usbfs (rw)
|
the problem is the "none on /dev type ramfs (rw)" because it has a size of 0, so when the script runs it tries to divide trough zero, thats why you got the error. My "fix" was to replace the for loop with:
| Quote: | for partition_stats in fs_stats:
if partition_stats["size"] != 0:
krell_value.append(float(partition_stats["used"])/partition_stats["size"])
text_value.append(str(int(partition_stats["avail"]/(1024.0**2))) + "M Free")
else:
krell_value.append(float(0))
text_value.append(str(int(0)) + "M Free")
|
I don't know if thats a "good" solution but it works ;D
Greets Physaro |
|
| Back to top |
|
 |
DeadMonkey Tux's lil' helper


Joined: 19 Jul 2002 Posts: 80 Location: Sitting in a Chair
|
Posted: Tue Apr 19, 2005 6:10 pm Post subject: |
|
|
Physaro,
Thanks for your reply. I was pondering whether to repost here, since I ended up with my laptop working but not my desktop. Now I can see the possible reason why.
When I get home I'll give this a shot, and see if that fixes it, then let you know.
J.R. |
|
| Back to top |
|
 |
DeadMonkey Tux's lil' helper


Joined: 19 Jul 2002 Posts: 80 Location: Sitting in a Chair
|
Posted: Wed Apr 20, 2005 12:55 am Post subject: |
|
|
| Yep, worked. Thanks again! Good fix! |
|
| Back to top |
|
 |
Physaro n00b

Joined: 24 Nov 2003 Posts: 17
|
Posted: Wed Apr 20, 2005 11:10 am Post subject: |
|
|
| No problem ;D |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|