lad1337 / XDM

XDM: eXtendable Download Manager. Plugin based media collection manager.
xdm.lad1337.de
Other
203 stars 46 forks source link

Error: No JSON object could be decoded When Searching for Books #105

Closed mastomi closed 10 years ago

mastomi commented 10 years ago

Hi Guys,

I'm having real troubles trying to download books on nzbs2go. It all seems set up correctly but I'm getting the below in the logs:

INFO 2014-01-13 16:49:09.368000
Init search of Book(de.lad1337.books)[56] Simon Scarrow The Blood Crows (Eagle, #12) on Newznab (Default) DEBUG 2014-01-13 16:49:09.412000
Final search term set for Book(de.lad1337.books)[56] Simon Scarrow The Blood Crows (Eagle, #12) is: [u'Simon Scarrow The Blood Crows '] DEBUG 2014-01-13 16:49:09.572000
Newsnab final search for term Simon Scarrow The Blood Crows url http://nzbs2go.com:80/api?apikey=##apikey##&maxage=900&o=json&cat=7000&q=Simon+Scarrow+The+Blood+Crows+&t=search ERROR 2014-01-13 16:49:09.574000
Error during downloadWrapperSingle of Newznab (Default) Error: No JSON object could be decoded

Traceback (most recent call last): File "C:\Program Files (x86)\XDM\xdm\plugins\meta.py", line 160, in outer return run(_args, _kwargs) File "C:\Program Files (x86)\XDM\xdm\plugins\bases.py", line 538, in downloadWrapperSingle res = self._searchForElement(_args, _kwargs) File "C:\Program Files (x86)\XDM\plugins\Indexer\Newznab-de_lad1337_newznab-0_7\Newznab.py", line 71, in searchForElement response = r.json() File "C:\Program Files (x86)\XDM\site-packages\requests\models.py", line 629, in json return json.loads(self.text or self.content, **kwargs) File "C:\Program Files (x86)\Python 2-7\lib\jsoninit.py", line 310, in loads return _default_decoder.decode(s) File "C:\Program Files (x86)\Python 2-7\lib\json\decoder.py", line 346, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Program Files (x86)\Python 2-7\lib\json\decoder.py", line 364, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

New value:[] Traceback: Traceback (most recent call last): File "C:\Program Files (x86)\XDM\xdm\plugins\meta.py", line 160, in outer return run(_args, _kwargs) File "C:\Program Files (x86)\XDM\xdm\plugins\bases.py", line 538, in downloadWrapperSingle res = self._searchForElement(_args, _kwargs) File "C:\Program Files (x86)\XDM\plugins\Indexer\Newznab-de_lad1337_newznab-0_7\Newznab.py", line 71, in searchForElement response = r.json() File "C:\Program Files (x86)\XDM\site-packages\requests\models.py", line 629, in json return json.loads(self.text or self.content, **kwargs) File "C:\Program Files (x86)\Python 2-7\lib\jsoninit.py", line 310, in loads return _default_decoder.decode(s) File "C:\Program Files (x86)\Python 2-7\lib\json\decoder.py", line 346, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Program Files (x86)\Python 2-7\lib\json\decoder.py", line 364, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded DEBUG 2014-01-13 16:49:10.096000
sending ERROR with notifiers INFO 2014-01-13 16:49:10.109000
We filtered all downloads out for Book(de.lad1337.books)[56] Simon Scarrow The Blood Crows (Eagle, #12)

When searching for the same book on the nzbs2go website I can find it so I know it's there. This is the same error I get searching for ANY book. Any ideas?

lad1337 commented 10 years ago

are you sure you entered your apikey ... if i use the given link

http://nzbs2go.com:80/api?apikey=##apikey##&maxage=900&o=json&cat=7000&q=Simon+Scarrow+The+Blood+Crows+&t=search

and replace ##apikey## with my apikey

i get a correct output ... you can get your apikey from http://nzbs2go.com/profile they call it site api/RSS key

the reason why you only see ##apikey## is because XDM (or rather the plugin) marked it as censored you can see what XDM really used when starting it with the additional --dev argument if you want to debug this further

mastomi commented 10 years ago

Hi,

Thanks very much for your reply.

Yeah I def have my api key in there. When I replace the censored ##apikey## with my actual key in a browser I get this:

This XML file does not appear to have any style information associated with it. The document tree is shown below. error code="500" description="Request limit reached. Retry in 121 minutes."/

Which, is odd as I can search fine on the site under my account.

I'll see if I can work out how to start with --dev.

mastomi commented 10 years ago

OK, started XDM with the --dev switch and it's definitely passing my api key through. For good measure I created a new account on nzbs2go and tried that and had the same results.

mastomi commented 10 years ago

Update:

Seems like it might either be an issue with nzbs2go or I might need a subscription to use the api on nzbs2go as it's working absolutely fine with nzb.ag.

lad1337 commented 10 years ago

The document tree is shown below. error code="500" description="Request limit reached. Retry in 121 minutes."

yes look like as a free user you are quite limited and the response they give that you reached that limit is not a json but rather a XML

which is in terms of an API not good practice but anyway it should work