py3-branch - Exception when nzb filename is short number

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 - Exception when nzb filename is short number

Post by Puzzled »

Code: Select all

2019-05-29 12:50:21,483::INFO::[postproc:328] Starting Post-Processing on 1000 => Repair:True, Unpack:True, Delete:True, Script:, Cat:*
2019-05-29 12:50:21,520::INFO::[nzbstuff:1548] [sabnzbd.postproc.process_job] Purging data for job 1000 (delete_all_data=False)
Exception in thread Thread-9:
Traceback (most recent call last):
  File "C:\Users\t\AppData\Local\Programs\Python\Python37\lib\threading.py", line 917, in _bootstrap_inner
    self.run()
  File "C:\git\sabnzbd\sabnzbd\postproc.py", line 239, in run
    process_job(nzo)
  File "C:\git\sabnzbd\sabnzbd\postproc.py", line 570, in process_job
    history_db.add_history_db(nzo, clip_path(workdir_complete), nzo.downpath, postproc_time, script_log, script_line)
  File "C:\git\sabnzbd\sabnzbd\database.py", line 280, in add_history_db
    t = build_history_info(nzo, storage, path, postproc_time, script_output, script_line, series_info=True)
  File "C:\git\sabnzbd\sabnzbd\database.py", line 493, in build_history_info
    seriesname, season, episode, _ = sabnzbd.newsunpack.analyse_show(nzo.final_name)
  File "C:\git\sabnzbd\sabnzbd\newsunpack.py", line 2281, in analyse_show
    job.match(force=True)
  File "C:\git\sabnzbd\sabnzbd\sorting.py", line 207, in match
    self.match_obj, self.extras = check_regexs(self.original_job_name, series_match)
  File "C:\git\sabnzbd\sabnzbd\sorting.py", line 1139, in check_regexs
    match1 = expression.search(filename)
TypeError: expected string or bytes-like object
Output of
logging.debug('%s.search(%s) types %s, %s', expression, filename, type(expression), type(filename)):
2019-05-29 12:50:21,542::DEBUG::[sorting:1139] re.compile('( [sS]|[\\d]+)x(\\d+)').search(1000) types <class 're.Pattern'>, <class 'int'>

I just converted it to str in check_regexs but it should probably be done earlier.
User avatar
safihre
Administrator
Administrator
Posts: 5523
Joined: April 30th, 2015, 7:35 am
Contact:

Re: py3-branch - Exception when nzb filename is short number

Post by safihre »

Creating Github issue so fixing later: https://github.com/sabnzbd/sabnzbd/issues/1296
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Post Reply