Crashes when adding NZB via API

Get help with all aspects of 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
upanddown
Newbie
Newbie
Posts: 2
Joined: March 28th, 2017, 5:07 am

Crashes when adding NZB via API

Post by upanddown »

I had been having random issues with sabnzbd crashing and could never trace or reproduce the cause. However, I am now consistently crashing it with the following (with several different NZB's from a public and popular indexer that is always good):

MyIP:8181/api?mode=addurl&name=URL-of-valid-nzb&nzbname=My-Random-Name&pp=3&priority=10&output=json&apikey=MyKey

...but if I use the web gui to load the same NZB from the URL then everything is fine.

API command response is:

{"status": true, "nzo_ids": ["SABnzbd_nzo_f9hfl3"]}

....and then it dies and the web gui says it's waiting for SABNZBd to restart. Close it, re-open and I find this exactly, every time:

28/Mar/2017:05:09:43] HTTP
Traceback (most recent call last):
File "cherrypy\_cprequest.pyo", line 670, in respond
File "cherrypy\lib\encoding.pyo", line 220, in __call__
File "cherrypy\_cpdispatch.pyo", line 60, in __call__
File "sabnzbd\interface.pyo", line 516, in tapi
File "sabnzbd\api.pyo", line 113, in api_handler
File "sabnzbd\api.pyo", line 176, in _api_queue
File "sabnzbd\api.pyo", line 285, in _api_queue_default
File "sabnzbd\api.pyo", line 1360, in build_queue
KeyError: 10


System information is:

Version: 1.2.3
OS: Windows Datacenter - Azure VM
Install-type: Windows Installer
Firewall Software: Windows Firewall
IPV6? no
Reproducible? yes

I'm lost, as my Google searches gave me nothing. Any ideas?
User avatar
safihre
Administrator
Administrator
Posts: 5678
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Crashes when adding NZB via API

Post by safihre »

That is because priority=10 doesn't exist, how did you come up with that value?

https://sabnzbd.org/wiki/advanced/api#addurl
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
upanddown
Newbie
Newbie
Posts: 2
Joined: March 28th, 2017, 5:07 am

Re: Crashes when adding NZB via API

Post by upanddown »

ROFL ....unadulterated stupidity, and lack of sleep? I somehow had it in my head that it was a relative value, more like a z-index in CSS, where higher values were pushed to the top of the stack.

I never snapped after a few hours of banging my head on it. Sorry to waste your time, but thank you for saving a lot of mine!

Thanks!
User avatar
safihre
Administrator
Administrator
Posts: 5678
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Crashes when adding NZB via API

Post by safihre »

Of course we should check our input values ;)
Just no-one tried so far to put anything else than the defined ones :D
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Post Reply