Main index > Usage problems > libstatgrab and SystemMonitor [SOLVED]

By ElCoco (User), on Wed Sep 14 02:13:24 2005: libstatgrab and SystemMonitor [SOLVED].

i have downloaded and installed libstatgrab6 and the latest pystatgrab but system monitor still complains.

Code:

Traceback (most recent call last):
  File "./SystemMonitor.py", line 43, in ?
    import statgrab
  File "/usr/lib/python2.4/site-packages/statgrab.py", line 23, in ?
    import _statgrab
ImportError: libstatgrab.so.6: cannot open shared object file: No such file or directory


i also installed higher versions and it still dosnt work

By syfou (Core Developer & Desklet Author), on Wed Sep 14 02:43:18 2005.

Should I infer by your question that you solved your previous problem (This is not a rhetorical question -- let me know so I can mark the thread as solved...or not).

ElCoco wrote:


i have downloaded and installed libstatgrab6 and the latest pystatgrab but system monitor still complains.

Well, clearly it didn't work. :-) It is unlikely to be related to SystemMonitor. Just try:

Code:


python -c 'import statgrab'


And you will most probably end up with a similar exception trace. It could be something else, but most of the time this is related to libraries (libstatgrab in this case) being installed outside the correct library paths... Did you specify the right --prefix for your system at configuration time? For instance, it is --prefix=/usr for most modern linux platforms. If the code snippet above generates the error, but that my suggestion does not help you, I suggest you address your request to the library authors directly, since this would be clearly out of adesklets control then.

By ElCoco (User), on Wed Sep 14 09:59:59 2005.

ok, ill try setting the prefix. thnx for your quick reply

By SWAT (User), on Sun Oct 30 13:29:24 2005.

I'm having a similar problem. I just used apt-get to install adesklets, so that went fine. Then I tried if it worked using the asimpleclock-desklet with the command "./asimpleclock.py"

When I do './SystemMonitor.py' my system gives me the following error (I also used apt-get to install statgrab, just to be sure):

Code:

./SystemMonitor.py
Traceback (most recent call last):
  File "./SystemMonitor.py", line 43, in ?
    import statgrab
ImportError: No module named statgrab

By syfou (Core Developer & Desklet Author), on Sun Oct 30 13:34:23 2005.

Please look at the README coming with the desklet. Did you install pystatgrab as well?

By SWAT (User), on Sun Oct 30 13:59:57 2005.

pystatgrab did do the trick. Would be nice if the dependencies would be at the top of the README :P
Well, installing pystatgrab helped me with that error, but I got at least 5 back in return. I'm giving adesklets up for the moment.... (btw, I'm using Ubuntu Breezy)

By syfou (Core Developer & Desklet Author), on Sun Oct 30 14:22:11 2005.

Well, what can I say? I just boot up an Ubuntu Hoary System, unpacked SystemMonitor 0.1.3, and it just worked. :roll: If you are giving up that fast, no one can possibly help you. Tough luck!

By SWAT (User), on Sun Oct 30 16:02:00 2005.

syfou wrote:

Well, what can I say? I just boot up an Ubuntu Hoary System, unpacked SystemMonitor 0.1.3, and it just worked. :roll: If you are giving up that fast, no one can possibly help you. Tough luck!
Nice and friendly :?. So you don't know the feeling of tingling with something for a while and then just don't feeling like it for a short time.

Then I get this error (I didn't tweak the config file yet):

Code:

Traceback (most recent call last):
  File "./SystemMonitor.py", line 1107, in ?
    EventHandler(dirname(__file__)).pause()
  File "./SystemMonitor.py", line 974, 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 1004, in ready
    self.meters[-1].create((8,tmp_height), self.basedir, meter[1])
  File "./SystemMonitor.py", line 918, in create
    info = self.parseFile(self.info_file)
  File "./SystemMonitor.py", line 899, in parseFile
    acpi_file = open(file, "r")
IOError: [Errno 2] No such file or directory: '/proc/acpi/battery/BAT0/info'


Even after using the 'default' config it gave me errors... The errors all start with that EventHandler(dirname(__file__)).pause()
edit: syfou, Since you used Hoary at some time, I'd like to know which packages you had installed, which python version and which sources you had in your sources.list. I think it's kinda strange it worked with Hoary (with you) and it doesn't work with Breezy (with me)

By cs-cam (Desklet Author), on Sun Oct 30 16:45:23 2005.

I haven't used SystemMonitor to be able to accurately guess what it's trying to do there, but that error isn't really the fault of the desklet. It's looking for a file in /proc (if you don't know what is contained in /proc, have a browse of this) and it's not finding it. Looks like it's trying to find out battery status or something, are you on a laptop?

By SWAT (User), on Sun Oct 30 17:02:21 2005.

No, I'm not using a laptop. That's why I removed the acpi/battery thing out of the applet, but still I get an error. Note: If I remove the ACPI part, the config file gets rewritten, so it includes it again, as soon as I run the applet.

On another note (I've been trying some stuff out) I'm using version 0.4.8 (don't know if that could be it, because that's the version in my repository). When I run SystemMonitor (or anetmon or something) it always rewrites the config file attached to that applet. Very strange!

OS: Ubuntu breezy (5.10)
Kernel: 2.6.12-9-686
Python 2.4 installed
pystatgrab 0.3 installed (self-built)
(lib)statgrab(5)(-dev) 0.11.1-2 installed (repository)

By syfou (Core Developer & Desklet Author), on Sun Oct 30 18:14:58 2005.

SWAT wrote:

syfou wrote:

Well, what can I say? I just boot up an Ubuntu Hoary System, unpacked SystemMonitor 0.1.3, and it just worked. :roll: If you are giving up that fast, no one can possibly help you. Tough luck!
Nice and friendly :?. So you don't know the feeling of tingling with something for a while and then just don't feeling like it for a short time.

It was rude... My apologies. I guess you do not know the feeling of having someone telling you he cannot use your software for multiple, unspecified reasons, then vanish forever in thin air without giving you a single chance to fix your potential bugs (happened more than a few times)... ;-) But that was no excuse for not being nice.

SWAT wrote:


syfou, Since you used Hoary at some time, I'd like to know which packages you had installed, which python version and which sources you had in your sources.list. I think it's kinda strange it worked with Hoary (with you) and it doesn't work with Breezy (with me)


It is not really significant, but here is goes:

Ubuntu Hoary Hedgehog (5.0.4)
Linux 2.6.14 (vanilla)
adesklets 0.4.12
Python 2.4.2
libstatgrab 0.12
pystatgrab 0.4

I compile myself most of my packages, so it is not of real use to you, apart from the fact that it do run...

This said. from your last two posts. I can confirm that removing the Battery Monitor is enough to get rid of the trace you mentioned. I can also say that most of the time, disappearing configuration and such are related to the way people start the desklets, and could very well explain why removing the Battery Monitor entry was not enough; see your documentation about that.

By the way, I strongly advise you to upgrade your adesklets version if you have a chance -- adesklets 0.4.8 is five months old (that's half the development time of the project!). It is no way more stable than adesklets 0.4.12, just older, and lacking a lot of boundary checks to help out new users.

By SWAT (User), on Mon Oct 31 14:34:00 2005.

Syfou, no problemo :)
I downloaded and installed the newest Imlib2 and then compiled the newest version of aDesklets. At least I saw a SystemMonitor just now 8)
And "trying" to install the newest aDesklets showed me a lot. During the ./configure part of the 'installation' I got a few errors about missing packages! It's always handy to ./configure the source, even if you don't want to install the homebuilt-version (good to know :D)
I'll tinker a bit with the configuration, but I guess it will work out fine. :wink:

edit: The 'config file' error I guess, happened because of a wrong chmod. It needs to be 755!

Offtopic: can the systemMonitor get input from lm-sensors or something? (this would really rock!)

By syfou (Core Developer & Desklet Author), on Mon Oct 31 15:11:38 2005.

SWAT wrote:

Can the systemMonitor get input from lm-sensors or something? (this would really rock!)

SystemMonitor is not difficult to adapt to new use; I myself helped someone in the past reading the temperature information out of the i2c bus. I suggest you go to the "About Existing Desklets => SystemMonitor" thread for this.

By louis_nichols (Friend of adesklets), on Sun Feb 5 16:27:12 2006.

Hi everybody!

I don't know if this is relevant anymore or if anyone still cares, but I ran into the sam eproblem with anetmon. I am uing Ubuntu Breezy. I installed libstatgrab the latest version from source and then pystatgrab. The desklet didn't work at first, but the whole thing was solved easily by simply doing, as root (or with sudo):

ln -s /usr/local/lib/libstatgrab.so.6.1.0 /usr/lib/libstatgrab.so.6

Now it works, except it only shows Rx data. I have a hunch that it adds the numbers from Rx and Tx and shows it all under Rx, but can't really check. Anyway, anyone else got this problem?

Edit: By the way: if anyone else is running Ubuntu Breezy and needs libstatgrab 0.12, I made a deb. The repos only have libstatgrab 0.11 at the time of this writing.


adesklets is proud to be hosted on:

SourceForge.net Logo

Back to adesklets.sf.net.