Page 1 of 1

SABnzbd 0.74+ for embedded device issue.

Posted: November 5th, 2012, 2:21 pm
by lancethepants
I run sabnzbd on my Asus RT-N16, with optware to supply python and all the necessary modules. I believe starting with 0.74 but definitely with 0.75 I get the following error when trying to access the web ui.

Code: Select all

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
  File "/opt/sabnzbd/cherrypy/_cprequest.py", line 618, in respond
    cherrypy.response.body = self.handler()
  File "/opt/sabnzbd/cherrypy/_cpdispatch.py", line 25, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/opt/sabnzbd/sabnzbd/interface.py", line 258, in index
    info, pnfo_list, bytespersec = build_header(self.__prim, self.__web_dir)
  File "/opt/sabnzbd/sabnzbd/api.py", line 1560, in build_header
    header['loadavg'] = loadavg()
  File "/opt/sabnzbd/sabnzbd/misc.py", line 1029, in loadavg
    p = '%.2f | %.2f | %.2f' % os.getloadavg()
AttributeError: 'module' object has no attribute 'getloadavg'
This device is running really slimmed down linux, and it looks like the new feature to show the cpu load is causing it to crash when looking for the 'os.getloadavg()' function, which is probably just not there. I'm fine with running 0.93, but maybe would be nice to see this as an optional feature, or perhaps disabled by default.

thanks for the awesome software.

Re: SABnzbd 0.74+ for embedded device issue.

Posted: November 5th, 2012, 2:32 pm
by shypike
It means that your Python installation is defective,
because os.getloadavg() is a standard function for Python on Posix systems.
Nevertheless, paranoid coding is always better.
Still, SABnzbd could/should handle this gracefully.

There is an option though:
Config->Special item show_sysload, set it to 0.
Also directly editable in the INI file.

Re: SABnzbd 0.74+ for embedded device issue.

Posted: November 15th, 2012, 9:56 pm
by zaubara
Hi!

I'm having the same issue.
I can't change the setting in the UI, because, well, the UI isn't working. I tried to set show_sysload = 0, but that didn't fix the issue for me, assuming I edited the correct file.
Right now I'm fiddling around with various python installations, but that's rather limited. Maybe there's a slight problem with the option?

Thanks!

Re: SABnzbd 0.74+ for embedded device issue.

Posted: November 16th, 2012, 1:13 am
by sander
Can you logon onto the device, and post the output of:

Code: Select all

free -m
and

Code: Select all

python
and then

Code: Select all

import os
os.getloadavg()
See below.

Code: Select all

sander@R540:~$ python
Python 2.7.3 (default, Sep 26 2012, 21:51:14) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.getloadavg()
(0.21, 0.6, 0.49)
>>> 
sander@R540:~$