API error on 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
pdupreez
Newbie
Newbie
Posts: 2
Joined: September 21st, 2017, 10:48 am

API error on adding NZB via API

Post by pdupreez »

I get these errors when an external API request is made to SABnzbd. This does not happen when manually adding, or when using Sonarr. For some reason I cannot paste the error message here (New users cannot paste links????).

I tried pasting an imgur link to a screenshot of the error but that was not working either. Maybe someone can enlighten me on how I can present the error message, as I cannot see where the links are that is preventing me from posting the error message?

[img]https://imgur.com/a/NrPtt[/img]




SABnzbd version: 2.2.1 running on Ubuntu 16.04

admin edit:


which --- via OCR --- translates to

[code] traceback (most recent call last): File Vusr/share/sabnzbdplus/cherrypy/sprequest.py", line 670, in respond response.body = selthand ler() File "/usr/share/sabnzbdplus/cherrypy/lib/encoding.py", line 220, in _call_ seltbody = seltoldhandler(`args,**kwargs) File "/usr/share/sabnzbdplus/cherrypy/spdispatch.py", line 60, in _call_ return seltcallable(`seltargs,**self.kwargs) File "/usr/share/sabnzbdplus/sabnzbd/interface.py", line 477, in api return api_handler(kwargs) File "/usr/share/sabnzbdplus/sabnzbd/api.py", line 115, in api_handler response = _apitable.get(mode, (_api_undefined, 2))[0](name, output, kwargs) File "/usr/share/sabnzbdplus/sabnzbd/api.py", line 573, in _api_addurl nzo_ids.append(sabnzbd.add_url(name, pp, script, cat, priority, nzbname)) File "/usr/share/sabnzbdplus/sabnzbd/_init_.py", line 546, in add_url if cat and cat.lower() == 'default': ttributeError: 'list' object has no attribute 'lower'[/code]
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: API error on adding NZB via API

Post by safihre »

You are supplying multiple categories with the API-call. So only 1 &category= can be in the URL.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
pdupreez
Newbie
Newbie
Posts: 2
Joined: September 21st, 2017, 10:48 am

Re: API error on adding NZB via API

Post by pdupreez »

Thanks for the response. I am not sure where that could come from. Is there any way I can see from a logfile the raw request (this is a call from an indexer , namely NZBGeek) to understand why it is doing that.
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: API error on adding NZB via API

Post by safihre »

Yes, if you enable Debug logging in the Status Window it will log the API-requests.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Post Reply