SABnzbd 0.74+ for embedded device issue.

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
lancethepants
Newbie
Newbie
Posts: 3
Joined: October 12th, 2011, 12:03 pm

SABnzbd 0.74+ for embedded device issue.

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: SABnzbd 0.74+ for embedded device issue.

Post 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.
zaubara
Newbie
Newbie
Posts: 1
Joined: November 15th, 2012, 9:49 pm

Re: SABnzbd 0.74+ for embedded device issue.

Post 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!
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: SABnzbd 0.74+ for embedded device issue.

Post 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:~$
Post Reply