py3-branch/Windows sabnzbd API-error

Questions and bug reports for Beta releases should be posted here.
Forum rules
Help us help you:
  • 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
Puzzled
Full Member
Full Member
Posts: 160
Joined: September 2nd, 2017, 3:02 am

py3-branch/Windows sabnzbd API-error

Post by Puzzled »

I have checked out SABnzbd from Git py3 branch on Windows. I don't have any experience with Python so this may well be a user error. Anyway, when it gets this request:

Code: Select all

http://localhost:5342/api?mode=history&name=delete&del_files=1&value=SABnzbd_nzo_lnnxc9kp&apikey=(removed)&output=json
it fails with

2019-05-17 17:25:04,219::ERROR::[_cplogging:216] [17/May/2019:17:25:04] HTTP
Traceback (most recent call last):
File "C:\Users\name\AppData\Local\Programs\Python\Python37\lib\site-packages\cherrypy\_cprequest.py", line 628, in respond
self._do_respond(path_info)
File "C:\Users\name\AppData\Local\Programs\Python\Python37\lib\site-packages\cherrypy\_cprequest.py", line 687, in _do_respond
response.body = self.handler()
File "C:\Users\name\AppData\Local\Programs\Python\Python37\lib\site-packages\cherrypy\lib\encoding.py", line 219, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "C:\Users\name\AppData\Local\Programs\Python\Python37\lib\site-packages\cherrypy\_cpdispatch.py", line 54, in __call__
return self.callable(*self.args, **self.kwargs)
File "C:\git\sabnzbd\sabnzbd\interface.py", line 460, in api
return api_handler(kwargs)
File "C:\git\sabnzbd\sabnzbd\api.py", line 99, in api_handler
response = _api_table.get(mode, (_api_undefined, 2))[0](name, output, kwargs)
File "C:\git\sabnzbd\sabnzbd\api.py", line 491, in _api_history
del_hist_job(job, del_files)
File "C:\git\sabnzbd\sabnzbd\api.py", line 1459, in del_hist_job
remove_all(history_db.get_path(job), recursive=True)
File "C:\git\sabnzbd\sabnzbd\decorators.py", line 37, in call_func
return f(*args, **kw)
File "C:\git\sabnzbd\sabnzbd\filesystem.py", line 755, in remove_all
if os.path.exists(path):
File "C:\Users\name\AppData\Local\Programs\Python\Python37\lib\genericpath.py", line 19, in exists
os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

System info:
SABnzbd.py-3.0.0-develop (rev=unknown)
Platform = Windows-10-10.0.17763-SP0 (win64)
Python-version = 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]

Edit: It turns out I can't delete it using the web interface either.
Last edited by Puzzled on May 18th, 2019, 5:08 am, edited 1 time in total.
User avatar
safihre
Administrator
Administrator
Posts: 5523
Joined: April 30th, 2015, 7:35 am
Contact:

Re: py3-branch/Windows sabnzbd API-error

Post by safihre »

Thanks for the report, it is a bug!
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
safihre
Administrator
Administrator
Posts: 5523
Joined: April 30th, 2015, 7:35 am
Contact:

Re: py3-branch/Windows sabnzbd API-error

Post by safihre »

Fixed in py3 :)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Post Reply