wkentaro / gdown

Google Drive Public File Downloader when Curl/Wget Fails
MIT License
4.06k stars 342 forks source link

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #250

Open VERISBABY opened 1 year ago

VERISBABY commented 1 year ago

Provide environment information

Python: 3.10.10, installed through: pip

What OS are you using?

Window 10

Describe the Bug

Traceback (most recent call last): File "c:\Users\Asus\Desktop\demo\home.py", line 267, in gdown.download_folder(url2, output='folder/pii', quiet=True) File "C:\Program Files\Python310\lib\site-packages\gdown\download_folder.py", line 260, in download_folder sess = _get_session(proxy=proxy, use_cookies=use_cookies) File "C:\Program Files\Python310\lib\site-packages\gdown\download.py", line 79, in _get_session cookies = json.load(f) File "C:\Program Files\Python310\lib\json__init.py", line 293, in load return loads(fp.read(), File "C:\Program Files\Python310\lib\json\init__.py", line 346, in loads return _default_decoder.decode(s) File "C:\Program Files\Python310\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Program Files\Python310\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Expected Behavior

i used gdown to download folders, it's work well in the old version but when i updated to the latest ver., then run my APP, it occur this error.

To Reproduce

No response

wkentaro commented 1 year ago

Folder downloading logic haven't changed recently, so probably Google's access limit or something like that. If you can show how to reproduce or actual response when the error happened, we can investigate to potentially fix or mitigate the issue.

michalkrawczyk commented 1 year ago

I have the same bug for every gdrive file I've attempted to download on my machine. Switching versions haven't changed anything. With wget files were still obtainable, but not with any python library anymore. Also in my case it happened, after few aborts of download with gdown, as some codes were tested.

orophix commented 1 year ago

Same issue for me too but works on a different machine with python 3.10.6

cuiaiyu commented 1 year ago

This solves the same issue for me. Looks like a cache problem?

orophix commented 1 year ago

Solved for me too!