Page 2 of 2

Re: 'NoneType' object has no attribute 'remove' [0.7.0B3]

Posted: May 29th, 2012, 1:46 pm
by i814u2
Yes, sorry, I missed that post at first. I just sent it off.

Re: 'NoneType' object has no attribute 'remove' [0.7.0B3]

Posted: May 29th, 2012, 2:08 pm
by shypike
Which provider are you using?
I have some trouble reproducing it.
I can see in the code where it goes wrong and I can prevent the crash.
But it would be great if I could actually reproduce it.

Re: 'NoneType' object has no attribute 'remove' [0.7.0B3]

Posted: May 29th, 2012, 2:15 pm
by i814u2
newshosting for newsgroups, comcast for internet provider (if that matters for any reason).

Re: 'NoneType' object has no attribute 'remove' [0.7.0B3]

Posted: May 29th, 2012, 2:35 pm
by shypike
Don't happen to have that Usenet provider (there's just too many).
Even with deleting some stuff from the NZB I cannot reproduce.
It looks like you're using Linux.
Are you comfortable with editing Python source files?
If so, you could make the following change and see whether that helps.
Edit the file /usr/share/sabnzbdplus/sabnzbd/nzbstuff.py line 1009:
Original:

Code: Select all

    def add_parfile(self, parfile):
        self.files.append(parfile)
        parfile.extrapars.remove(parfile)
Change to:

Code: Select all

    def add_parfile(self, parfile):
        self.files.append(parfile)
        if parfile.extrapars:
            parfile.extrapars.remove(parfile)
Use spaces for indentation.
Then restart SABnzbd.

Re: 'NoneType' object has no attribute 'remove' [0.7.0B3]

Posted: May 29th, 2012, 2:48 pm
by i814u2
I'll try that out.
Yes, I'm using Ubuntu (Server) 12.04.
I'll attempt the edit and let you know how it goes.
I assume I can edit the NZB to trim it down to only one set of files, correct? I'd prefer to not have to re-download all of the files again...

Re: 'NoneType' object has no attribute 'remove' [0.7.0B3]

Posted: May 29th, 2012, 2:54 pm
by shypike
While you're at it, it's probably best to remove the file nzbstuff.pyc, should it exist.
I think the problem is in episode 7. I trimmed it down too.
It could be that only the full file will trigger the problem, but there's no way of telling.

Actually this code would be better:

Code: Select all

    def add_parfile(self, parfile):
        self.files.append(parfile)
        if parfile.extrapars:
            parfile.extrapars.remove(parfile)
        else:
            logging.warning('PARFILE without EXTRAPARS %s', parfile.filename or parfile.subject)
That will tell you whether the bug would have triggered.

Re: 'NoneType' object has no attribute 'remove' [0.7.0B3]

Posted: May 29th, 2012, 6:30 pm
by i814u2
I provided E07 as an example, but initially others gave me issues as well (E04 for sure, which was right near E07 in the initial log file).

I trimmed the NZB down to E07 and it fails to extract (not enough pars) but I haven't received the error. I'm running it again with you log warning just to be certain.

Re: 'NoneType' object has no attribute 'remove' [0.7.0B3]

Posted: May 29th, 2012, 6:51 pm
by i814u2
Yep. That's the spot. When I added the logging, I received the following at the end of the download:

Code: Select all

2012-05-29 18:40:32,104	WARNING:	PARFILE without EXTRAPARS Boardwalk.Empire.S02E07.720p.HDTV.DD5.1.x264-CtrlHD.vol003+04.par2
2012-05-29 18:40:32,104	WARNING:	PARFILE without EXTRAPARS Boardwalk.Empire.S02E07.720p.HDTV.DD5.1.x264-CtrlHD.vol007+08.par2
2012-05-29 18:40:32,104	WARNING:	PARFILE without EXTRAPARS Boardwalk.Empire.S02E07.720p.HDTV.DD5.1.x264-CtrlHD.vol015+16.par2
2012-05-29 18:40:32,104	WARNING:	PARFILE without EXTRAPARS Boardwalk.Empire.S02E07.720p.HDTV.DD5.1.x264-CtrlHD.vol031+11.par2
2012-05-29 18:40:32,103	WARNING:	PARFILE without EXTRAPARS Boardwalk.Empire.S02E07.720p.HDTV.DD5.1.x264-CtrlHD.vol042+27.par2
2012-05-29 18:40:32,103	WARNING:	PARFILE without EXTRAPARS Boardwalk.Empire.S02E07.720p.HDTV.DD5.1.x264-CtrlHD.vol069+27.par2
2012-05-29 18:40:32,103	WARNING:	PARFILE without EXTRAPARS Boardwalk.Empire.S02E07.720p.HDTV.DD5.1.x264-CtrlHD.vol096+27.par2
2012-05-29 18:40:32,103	WARNING:	PARFILE without EXTRAPARS Boardwalk.Empire.S02E07.720p.HDTV.DD5.1.x264-CtrlHD.vol123+27.par2
2012-05-29 18:40:32,103	WARNING:	PARFILE without EXTRAPARS Boardwalk.Empire.S02E07.720p.HDTV.DD5.1.x264-CtrlHD.vol150+27.par2

Re: 'NoneType' object has no attribute 'remove' [0.7.0B3]

Posted: May 30th, 2012, 12:37 am
by shypike
Can you email the full log file for an episode that gives these warnings?
Only a "Debug" log is useful.
This will tell me which articles are missing, which will help me in reconstructing events.

Re: 'NoneType' object has no attribute 'remove' [0.7.0B3]

Posted: May 30th, 2012, 9:06 am
by i814u2
I'll work on that report. Since I had debugging still on, my normal scheduled downloads caused the log to roll over and I lost the previous warnings (thought I saved a copy of that one, but I just copied and pasted for my post).
I just re-ran the nzb and of course it didn't error this time. I'll email one as soon as I can get a log with the proper "issues" documented.

EDIT: I'm dumb. I forgot to manually check for old logs. I'll search through those and get the one with the proper info sent over to you.

EDIT 2: log file found, trimmed, and sent.