liamwhite / Derpibooru-dl

Derpibooru downloader written in python. User interface is through text files.
17 stars 9 forks source link

No JSON object could be decoded Traceback #29

Open Dalesw2 opened 8 years ago

Dalesw2 commented 8 years ago

2016-09-29 20:52:39,368 - DEBUG - Logging started. 2016-09-29 20:52:40,453 - DEBUG - API Key looks fine. 2016-09-29 20:52:40,467 - INFO - Attempting to resume any failed downloads. 2016-09-29 20:52:42,269 - DEBUG - Menu user input:'3' 2016-09-29 20:52:47,509 - DEBUG - Query: 'bug mom' 2016-09-29 20:52:47,510 - DEBUG - Starting search for query: 'bug mom' 2016-09-29 20:52:47,526 - INFO - Starting new HTTPS connection (1): derpiboo.ru 2016-09-29 20:52:47,796 - DEBUG - "GET /search.json?perpage=50&sf=created_at&q=bug+mom&key=FZskUzzse7oPtT1LPYpu&page=1&sd=desc HTTP/1.1" 200 None 2016-09-29 20:52:47,806 - CRITICAL - Unhandled exception! 2016-09-29 20:52:47,808 - CRITICAL - <type 'exceptions.ValueError'> 2016-09-29 20:52:47,808 - ERROR - No JSON object could be decoded Traceback (most recent call last): File "C:\Users\Dale\Desktop\Derpibooru-dl-master\derpibooru_dl.py", line 1411, in main() File "C:\Users\Dale\Desktop\Derpibooru-dl-master\derpibooru_dl.py", line 1394, in main console_menu(settings,input_file_list) File "C:\Users\Dale\Desktop\Derpibooru-dl-master\derpibooru_dl.py", line 1309, in console_menu process_query(settings,search_query) File "C:\Users\Dale\Desktop\Derpibooru-dl-master\derpibooru_dl.py", line 987, in process_query submission_ids = search_for_query(settings, search_query) File "C:\Users\Dale\Desktop\Derpibooru-dl-master\derpibooru_dl.py", line 589, in search_for_query for image in derpibooru.Search().key(settings.api_key).limit(None).query(search_query): File "C:\Python27\lib\site-packages\derpibooru\search.py", line 184, in next return Image(self._search.next()) File "C:\Python27\lib\site-packages\derpibooru\request.py", line 80, in get_images for image in r: File "C:\Python27\lib\site-packages\derpibooru\request.py", line 56, in request images, image_count = request.json()["search"], 0 File "C:\Python27\lib\site-packages\requests\models.py", line 826, in json return complexjson.loads(self.text, **kwargs) File "C:\Python27\lib\jsoninit.py", line 339, in loads return _default_decoder.decode(s) File "C:\Python27\lib\json\decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Python27\lib\json\decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded 2016-09-29 20:52:47,815 - INFO - Program finished.

Apple240Bloom commented 8 years ago

I read in the forum they're shutting down the derpiboo.ru domain or something looks like everything is going to have to be moved over? I'm not sure if derpibooru.org will work the same... hmm

joeyponi commented 8 years ago

This script has always pointed towards the derpibooru.org domain, not derpiboo.ru. And the API works exactly the same across all the site's domain.

There hasn't really been any major changes to the site's API recently though AFAIK. It's still outputting valid JSON.

oblivion2k commented 8 years ago

Ahh, ok, I thought I had broken my copy of the script when I reinstalled Windows. I've got an identical output on my end as well. "No JSON object could be decoded." I threw the search.json query into Firefox and it appears to be returning the same-formatted results it always has, at least to my knowledge. Not sure what to do about this one. I'll be subscribing to this thread though so if anybody spots the problem I might be able to throw in a fix if nobody gets to it first.

Does the script save results of the JSON query anywhere other than get_last_not_HTML? I know that only saves the most recent results. If we can find query results from back when the script was working and cross-check them, maybe something was changed.

ImintA2 commented 8 years ago

The script works for me again after I changed the domain name in \lib\site-packages\derpibooru\request.py from derpiboo.ru to derpibooru.org and rebuilt the .exe

Apple240Bloom commented 8 years ago

Is there any way I could get a copy of that exe? I have no idea how to build the exe, I'm pythomatically retarded.

Dalesw2 commented 8 years ago

@Apple240Bloom derpibooru_dl-2016-10-5.zip

Will take down if asked. All Credit goes to @woodenphone , @JoeyH3 , @ImintA2 and everyone else who work on it.

joeyponi commented 8 years ago

Awesome, thank you for fixing and reuploading that @Dalesw2!

I don't have a dev VM setup at the moment, so I've not been able to do any coding my self :/