evilhero / mylar

An automated Comic Book downloader (cbr/cbz) for use with SABnzbd, NZBGet and torrents
GNU General Public License v3.0
976 stars 172 forks source link

Searching for Superman gives 500 Internal Server error #1773

Closed benkirkley closed 6 years ago

benkirkley commented 6 years ago

If I type 'superman' in the search box, at the top of the page, Mylar returns a 500 error. Other searches are coming back fine (eg, spider-gwen).

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
  File "C:\Program Files (x86)\mylar\lib\cherrypy\_cprequest.py", line 645, in respond
    response.body = self.handler()
  File "C:\Program Files (x86)\mylar\lib\cherrypy\lib\encoding.py", line 188, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "C:\Program Files (x86)\mylar\lib\cherrypy\_cpdispatch.py", line 29, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "C:\Program Files (x86)\mylar\mylar\webserve.py", line 242, in searchit
    searchresults, explicit = mb.findComic(name, mode, issue=None, explicit=explicit)
  File "C:\Program Files (x86)\mylar\mylar\mb.py", line 134, in findComic
    searched = pullsearch(comicapi, comicquery, 0, explicit, type)
  File "C:\Program Files (x86)\mylar\mylar\mb.py", line 78, in pullsearch
    dom = parseString(r.content) #(data)
  File "C:\Program Files (x86)\python2\lib\xml\dom\minidom.py", line 1928, in parseString
    return expatbuilder.parseString(string)
  File "C:\Program Files (x86)\python2\lib\xml\dom\expatbuilder.py", line 940, in parseString
    return builder.parseString(string)
  File "C:\Program Files (x86)\python2\lib\xml\dom\expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
ExpatError: syntax error: line 1, column 0

There is nothing in the log or CLI about the error. All I get is the message on the web page. I can then press the browser's back button and continue using Mylar as normal.

evilhero commented 6 years ago

It's a problem currently with the search api being used with CV. They're enforcing some limitations on the backend with regards to searches and it's throwing mylar's current search methodology completely off.

I have this fixed in the config-upgrade branch, and should push it into development tomorrow pending something blowing up on that branch before then.

In the meantime, you can try encasing your query in double quotation marks which should limit the search to a more exact term, but because it's only one word I'm not sure if that will work in this case (ie. "Superman")

evilhero commented 6 years ago

I was just looking at this again and encountered the error, again - and then I did some searching....

It looks like this is some kind of issue with CV and some specific series getting stuck in some kind of weird loop on their end. The link to the forum post describing it is here, but atm there doesn't look like there's a fix for it.

I would suggest if you're looking to add a particular series and it's one of those 2 queries listed as having problems (atm it says the 2 affected are Superman and Cyborg), to perhaps do a search on comicvine for the particular series and once you have the series you can just enter in the comicid into the Mylar search bar at the top of every page (in the format of 4050-xxxxxx) and it will directly add that series, thereby bypassing the problematic queries.

benkirkley commented 6 years ago

Thanks for looking into this @evilhero. I'll follow the steps you mentioned to add it directly.

benkirkley commented 6 years ago

It looks like they've fixed the problem on their end. I can successfully search for Superman now.