Page 1 of 1

py3-branch/Windows sabnzbd API-error

Posted: May 17th, 2019, 10:58 am
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.

Re: py3-branch/Windows sabnzbd API-error

Posted: May 17th, 2019, 2:25 pm
by safihre
Thanks for the report, it is a bug!

Re: py3-branch/Windows sabnzbd API-error

Posted: May 17th, 2019, 2:30 pm
by safihre
Fixed in py3 :)