Repository: mylar3/mylar3

Issue #1099: Error on Retry a Snatched comic that did not get Post-Processed
Created: 2022-03-14T05:18:43Z
Describe the bug
On the History tab, if I press Retry on a Snatched comic that did not get post-processed, I get a windows error with this HTML code:
ERROR<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
    <title>500 Internal Server Error</title>
    <style type="text/css">
    #powered_by {
        margin-top: 20px;
        border-top: 2px solid black;
        font-style: italic;
    }

    #traceback {
        color: red;
    }
    </style>
</head>
    <body>
        <h2>500 Internal Server Error</h2>
        <p>The server encountered an unexpected condition which prevented it from fulfilling the request.</p>
        <pre id="traceback">Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/cherrypy/_cprequest.py", line 638, in respond
    self._do_respond(path_info)
  File "/usr/lib/python3.9/site-packages/cherrypy/_cprequest.py", line 697, in _do_respond
    response.body = self.handler()
  File "/usr/lib/python3.9/site-packages/cherrypy/lib/encoding.py", line 223, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/cherrypy/_cpdispatch.py", line 54, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/app/mylar3/mylar/webserve.py", line 2390, in retryissue
    sendit = search.searcher(fullprov, nzbname, comicinfo, link=link, IssueID=IssueID, ComicID=ComicID, tmpprov=fullprov, directsend=True, newznab=newznabinfo)
  File "/app/mylar3/mylar/search.py", line 2875, in searcher
    nzbid = comicinfo[0]['nzbid']
KeyError: 'nzbid'
</pre>
    <div id="powered_by">
      <span>
        Powered by <a href="http://www.cherrypy.org">CherryPy 18.6.1</a>
      </span>
    </div>
    </body>
</html>
I also get the same traceback on the logs if I press Retry the same download again on the comic page.
CarePackage
Environment (please complete the following information):

Linuxserver.io Docker Container on a Synology NAS
Version: 2c9dab6 (python3-dev)

Duplicate issue #1196: Accidentally rm -rf in ~ folder and deleted everything, re-install not post-processing sab downloads or producting a care package
Created: 2022-05-03T13:54:51Z
Describe the bug
I idiotically typed rm -rf * in my home folder so I had to re-install mylar3.
It will snatch nzb's from my providers fine but it will not post process once Sab is done. The check for Sab integration works.
Logs show 'Key Error : 'nzbid'
CarePackage
This doesn't work either, gives KeyError: 'install_type'.
From logs ..
03-May-2022 13:30:30 - DEBUG   :: mylar.runGit.61 : CP Server Thread-2 : Git output: CompletedProcess(args='git log --encoding=UTF-8 --pretty=format:"%h - %cr - %an - %s" -n 5', returncode=0, stdout='835e7757 - 18 hours ago - evilhero - F
IX: duplication of downloads in history table (going forward), IMP: Provider column added to history table and bettter column lengths\n0243f1b2 - 18 hours ago - evilhero - FIX: pip req check would fail on docker installs with not display,
FIX: installation type included in carepackage\ndc972e9b - 4 days ago - evilhero - FIX:(#1181) CDH hard-coded category mapping\n73808fe3 - 11 days ago - evilhero - FIX: docker startup issues with requirements detection\nfb392902 - 12 day
s ago - evilhero - FIX: forgot the .release_messages check', stderr='')
03-May-2022 13:30:48 - INFO    :: mylar.fly_me_to_the_moon.2988 : CP Server Thread-5 : weeknumber: 18
03-May-2022 13:30:48 - INFO    :: mylar.fly_me_to_the_moon.3091 : CP Server Thread-5 : mismatched: []
03-May-2022 13:30:56 - INFO    :: mylar.retryissue.2211 : Thread-12 : Located snatched download:
03-May-2022 13:30:56 - INFO    :: mylar.retryissue.2212 : Thread-12 : --Referencing : NZBPlanet (newznab) @ 2022-05-02 09:31:11
03-May-2022 13:30:56 - INFO    :: mylar.retryissue.2211 : Thread-12 : Located snatched download:
03-May-2022 13:30:56 - INFO    :: mylar.retryissue.2212 : Thread-12 : --Referencing : NZBPlanet @ 2022-05-02 09:31:11
03-May-2022 13:30:56 - INFO    :: mylar.retryissue.2390 : Thread-12 : fetched via newnzab. Retrying the send.
03-May-2022 13:30:56 - INFO    :: mylar.retryissue.2404 : Thread-12 : newznab detected as : NZBPlanet @ http://api.nzbplanet.net/
03-May-2022 13:30:56 - INFO    :: mylar.retryissue.2405 : Thread-12 : link : http://api.nzbplanet.net//api?apikey=
03-May-2022 13:30:56 - ERROR   :: mylar.excepthook.315 : Thread-12 : Uncaught exception: Traceback (most recent call last):
File "/home/lusiphur/mylar3/mylar/logger.py", line 337, in new_run
old_run(*args, **kwargs)
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/lusiphur/mylar3/mylar/webserve.py", line 2418, in retryissue
sendit = search.searcher(fullprov, nzbname, comicinfo, link=link, IssueID=IssueID, ComicID=ComicID, tmpprov=fullprov, directsend=True, newznab=newznabinfo)
File "/home/lusiphur/mylar3/mylar/search.py", line 2875, in searcher
nzbid = comicinfo[0]['nzbid']
KeyError: 'nzbid'
Environment (please complete the following information):

OS: Ubuntu 20.04
Branch / commit: python3-dev/835e77572002c2123a708d4fb5a195ed3992ad69

Additional information
Add any other information about the problem here.

Closing comment (2022-05-03T14:34:46Z): Probably the same as #1099.
Try to download without using the retry option - should work as expected when not using the Retry option as that appears to be broken.
Also try starting mylar with the maintenance -care option (ie. python Mylar.py maintenance -care -v) - provided it's not a docker installation.