Loading .../.sabnzbd/admin/Rating.sab failed

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

Loading .../.sabnzbd/admin/Rating.sab failed

Post by sander »

(Related: http://forums.sabnzbd.org/viewtopic.php?f=2&t=17844 )

I often get the error "Loading /home/sander/.sabnzbd/admin/Rating.sab failed"

Examples:

Code: Select all

$ grep -i 'rating.sab failed' sabnzbd.log*
sabnzbd.log:2014-10-07 20:35:20,201::ERROR::[__init__:962] Loading C
sabnzbd.log.1:2014-09-29 23:09:41,053::ERROR::[__init__:962] Loading /home/sander/.sabnzbd/admin/Rating.sab failed
sabnzbd.log.1:2014-09-30 22:02:20,317::ERROR::[__init__:962] Loading /home/sander/.sabnzbd/admin/Rating.sab failed
sabnzbd.log.1:2014-10-02 07:48:27,987::ERROR::[__init__:962] Loading /home/sander/.sabnzbd/admin/Rating.sab failed
sabnzbd.log.1:2014-10-04 07:46:59,969::ERROR::[__init__:962] Loading /home/sander/.sabnzbd/admin/Rating.sab failed
sabnzbd.log.2:2014-09-23 08:00:58,657::ERROR::[__init__:962] Loading /home/sander/.sabnzbd/admin/Rating.sab failed
sabnzbd.log.2:2014-09-23 13:18:07,248::ERROR::[__init__:962] Loading /home/sander/.sabnzbd/admin/Rating.sab failed
sabnzbd.log.2:2014-09-23 20:54:45,614::ERROR::[__init__:962] Loading /home/sander/.sabnzbd/admin/Rating.sab failed
sabnzbd.log.2:2014-09-24 07:47:38,977::ERROR::[__init__:962] Loading /home/sander/.sabnzbd/admin/Rating.sab failed
sabnzbd.log.4:2014-09-20 12:15:10,746::ERROR::[__init__:962] Loading /home/sander/.sabnzbd/admin/Rating.sab failed
I checked and the file does exist ... since yesterday

Code: Select all

$ ll /home/sander/.sabnzbd/admin/Rating.sab 
-rw-rw-r-- 1 sander sander 452 okt  6 22:20 /home/sander/.sabnzbd/admin/Rating.sab
So why is SAB reporting today it does not exist. Oh wait ... "Loading ... failed". SAB does NOT say the file does not exist, only that the loading failed. ::)

Let's check the code:

Code: Select all

    try:
        f = open(path, 'rb')
        if do_pickle:
            data = cPickle.load(f)
        else:
            data = f.read()
        f.close()

        if remove:
            os.remove(path)
    except:
        logging.error(Ta('Loading %s failed'), path)
        logging.info("Traceback: ", exc_info = True)
        return None
So options:
- something went wrong with the open
- something went wrong with the pickle stuff
- something went wrong with the close or the remove

I'll put some extra logging into __init__.py and see what results that gives.
User avatar
sander
Release Testers
Release Testers
Posts: 8831
Joined: January 22nd, 2008, 2:22 pm

Re: Loading .../.sabnzbd/admin/Rating.sab failed

Post by sander »

User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Loading .../.sabnzbd/admin/Rating.sab failed

Post by shypike »

Sloppy code in the oznab ratings support.
Likely to be a corrupt file or maybe just an empty one.
Do you use oznzb ?
User avatar
sander
Release Testers
Release Testers
Posts: 8831
Joined: January 22nd, 2008, 2:22 pm

Re: Loading .../.sabnzbd/admin/Rating.sab failed

Post by sander »

shypike wrote: Do you use oznzb ?
I've once made an account there and downloaded two or three NZBs
Post Reply