AlphaSlayer1964 / kemono-dl

A simple kemono.party downloader using python.
504 stars 82 forks source link

json decoder error #25

Closed baraa272 closed 2 years ago

baraa272 commented 2 years ago

Version

Version: 2021.11.03

Service, User ID, Post ID

Your Command

Y:\gallery-dl\kemono-dl-2021.11.03>python kemono-dl.py --cookies "kemono.party_cookies.txt" -l https://kemono.party/fanbox/user/12818930

Error messages and tracebacks

Traceback (most recent call last): File "Y:\gallery-dl\kemono-dl-2021.11.03\kemono-dl.py", line 4, in main() File "Y:\gallery-dl\kemono-dl-2021.11.03\src\main.py", line 15, in main if not extract_link_info(link): File "Y:\gallery-dl\kemono-dl-2021.11.03\src\api.py", line 284, in extract_link_info info['username'] = get_username(info) File "Y:\gallery-dl\kemono-dl-2021.11.03\src\api.py", line 273, in get_username for creator in response.json(): File "C:\Users\Aiba\AppData\Local\Programs\Python\Python39-32\lib\site-packages\requests\models.py", line 900, in json return complexjson.loads(self.text, **kwargs) File "C:\Users\Aiba\AppData\Local\Programs\Python\Python39-32\lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) File "C:\Users\Aiba\AppData\Local\Programs\Python\Python39-32\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\Aiba\AppData\Local\Programs\Python\Python39-32\lib\json\decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 2511450 (char 2511449)

Additional comments

followed every step by step carefully

AlphaSlayer1964 commented 2 years ago

Does this error occur on a specific post? I ran the same command and didn't get the error.

CODE-LA-LI-LU-LE-LO commented 2 years ago

I experienced the same error. It's occasionally found, but it doesn't seem to happen only in certain posts. Most of them work normally when re-run, but it is inconvenient.

CODE-LA-LI-LU-LE-LO commented 2 years ago

In my case, while using the '--favorite-users' argument, an error occurs when I finish downloading one user and move on to the next user. Sometimes the error also occurs when reading the first user.

AlphaSlayer1964 commented 2 years ago

Do you have a slow internet connection? The only guess to why this is happening is because it is not able to download the whole page before it tries to read it as a json object.

AlphaSlayer1964 commented 2 years ago

This issue should be fixed in the latest release. hopefully