Page 1 of 1

0.7.8 local variable 'killed' referenced before assignment

Posted: January 5th, 2013, 3:27 pm
by sirroden
When downloading several different nzb's the following error occurred and sabnzbd pauses:

Looking in the error log I find:

Code: Select all

Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/share/sabnzbdplus/sabnzbd/decoder.py", line 174, in run
    if killed:
UnboundLocalError: local variable 'killed' referenced before assignment
running on with all updates installed
Distributor ID : Ubuntu
Description : Ubuntu 12.04.1 LTS
Release : 12.04
Codename : precise

Re: 0.7.8 local variable 'killed' referenced before assignme

Posted: January 5th, 2013, 4:58 pm
by Tybio
I'm seeing the same thing:

Code: Select all

2013-01-05 16:54:06,998::INFO::[downloader:567] Connecting [email protected]:119 finished
2013-01-05 16:54:12,490::INFO::[decoder:118] CRC Error in [email protected] (A93F1CAD -> A3BDD0E9)
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/local/sabnzbd/sabnzbd/decoder.py", line 174, in run
    if killed:
UnboundLocalError: local variable 'killed' referenced before assignment

Re: 0.7.8 local variable 'killed' referenced before assignme

Posted: January 5th, 2013, 5:17 pm
by Tybio
Went back to 0.7.7 and it is working fine.

OS is Slackware 13 fully updated BTW.

Re: 0.7.8 local variable 'killed' referenced before assignme

Posted: January 6th, 2013, 9:30 am
by jcfp
Looks like a simple coding error introduced in this commit. In the try/except statement starting at line 96 of decoder.py the 'killed' var is defined only in case of BadYenc but not for CrcError, IOError, or the catchall.

Re: 0.7.8 local variable 'killed' referenced before assignme

Posted: January 6th, 2013, 1:00 pm
by shypike
Hangs head in shame :(

Re: 0.7.8 local variable 'killed' referenced before assignme

Posted: January 6th, 2013, 1:05 pm
by bmanusenet
I have no idea what this is how if I am suppose to know how to fix it but when creating a new post I was linked here.

I think I am having the same problem.

Download starts, goes for awhile (maxed out connecting 2.5MB/s) and then stops, 0. I restart Sab and it starts going again.

I am on Usenetserver, Ubuntu 12.04, internal drives, no new features enabled 0.7.8"

Re: 0.7.8 local variable 'killed' referenced before assignme

Posted: January 6th, 2013, 1:25 pm
by shypike
bmanusenet wrote:I have no idea what this is how if I am suppose to know how to fix it but when creating a new post I was linked here.
He want to know how to revert to 0.7.7.
Which apt-get is that?

Re: 0.7.8 local variable 'killed' referenced before assignme

Posted: January 6th, 2013, 2:45 pm
by jcfp
shypike wrote:He want to know how to revert to 0.7.7.
Which apt-get is that?
Apt-get only knows stuff currently on offer in repositories, so there'll typically be two known versions of sab: the latest (from the ppa) and whatever came with the ubuntu release (often rather ancient).

The simplest in this case is probably to just replace the decoder.py with the fixed one:

Code: Select all

wget https://raw.github.com/sabnzbd/sabnzbd/master/sabnzbd/decoder.py
sudo chown 0:0 decoder.py
sudo chmod 644 decoder.py
sudo rm /usr/share/sabnzbdplus/sabnzbd/decoder.pyc
sudo mv -f decoder.py /usr/share/sabnzbdplus/sabnzbd/decoder.py
...and then restart the program.

Re: 0.7.8 local variable 'killed' referenced before assignme

Posted: January 6th, 2013, 3:08 pm
by sander
shypike wrote:
bmanusenet wrote:I have no idea what this is how if I am suppose to know how to fix it but when creating a new post I was linked here.
He want to know how to revert to 0.7.7.
Which apt-get is that?

I would think

Code: Select all

sudo apt-get install sabnzbdplus=0.7.7-0ubuntu1~jcfp1~quantal
but that doesn't work:

Code: Select all

sander@R540:$ sudo apt-get install sabnzbdplus=0.7.7-0ubuntu1~jcfp1~quantal
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '0.7.7-0ubuntu1~jcfp1~quantal' for 'sabnzbdplus' was not found
sander@R540:$ 
https://launchpad.net/~jcfp/+archive/ppa/+build/4064630 seems to provide it, so I must be doing something wrong.

Re: 0.7.8 local variable 'killed' referenced before assignme

Posted: January 6th, 2013, 3:46 pm
by sirroden
shypike wrote:Hangs head in shame :(
You shouldn´t be ashamed, first issue I noticed since I started using this fantastic program years ago ;)

I´ll try the new decoder.py