0.7.8 local variable 'killed' referenced before assignment

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
sirroden
Newbie
Newbie
Posts: 2
Joined: January 5th, 2013, 3:07 pm

0.7.8 local variable 'killed' referenced before assignment

Post 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
Last edited by sirroden on January 6th, 2013, 2:19 am, edited 1 time in total.
Tybio
Newbie
Newbie
Posts: 2
Joined: January 5th, 2013, 4:57 pm

Re: 0.7.8 local variable 'killed' referenced before assignme

Post 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
Tybio
Newbie
Newbie
Posts: 2
Joined: January 5th, 2013, 4:57 pm

Re: 0.7.8 local variable 'killed' referenced before assignme

Post by Tybio »

Went back to 0.7.7 and it is working fine.

OS is Slackware 13 fully updated BTW.
User avatar
jcfp
Release Testers
Release Testers
Posts: 1004
Joined: February 7th, 2008, 12:45 pm

Re: 0.7.8 local variable 'killed' referenced before assignme

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

Re: 0.7.8 local variable 'killed' referenced before assignme

Post by shypike »

Hangs head in shame :(
bmanusenet
Newbie
Newbie
Posts: 31
Joined: April 17th, 2012, 12:13 am

Re: 0.7.8 local variable 'killed' referenced before assignme

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

Re: 0.7.8 local variable 'killed' referenced before assignme

Post 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?
User avatar
jcfp
Release Testers
Release Testers
Posts: 1004
Joined: February 7th, 2008, 12:45 pm

Re: 0.7.8 local variable 'killed' referenced before assignme

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

Re: 0.7.8 local variable 'killed' referenced before assignme

Post 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.
sirroden
Newbie
Newbie
Posts: 2
Joined: January 5th, 2013, 3:07 pm

Re: 0.7.8 local variable 'killed' referenced before assignme

Post 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
Post Reply