gladisor / AdviceBot

Chatbot which gives general advice using a language model
GNU General Public License v3.0
0 stars 0 forks source link

Error getting comments from pushshift. #11

Closed gladisor closed 3 years ago

gladisor commented 3 years ago

Getting this error when requesting larger numbers of posts / comments from pushshift. Not sure why. It works for requesting 5 posts. Try running test.py.

Traceback (most recent call last): File "C:\Users\123tr\Desktop\AdviceBot\test.py", line 52, in comments = list(map(get_comments, ids)) File "C:\Users\123tr\Desktop\AdviceBot\utils.py", line 69, in get_comments return request_data(url) File "C:\Users\123tr\Desktop\AdviceBot\utils.py", line 20, in request_data data = json.loads(r.text) File "C:\Users\123tr\miniconda3\envs\adv\lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) File "C:\Users\123tr\miniconda3\envs\adv\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\123tr\miniconda3\envs\adv\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)