youtube-comment-downloader icon indicating copy to clipboard operation
youtube-comment-downloader copied to clipboard

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Open epireve opened this issue 2 years ago • 0 comments

Hi there,

Yesterday it was all fine. Been running about half a day before it spitted out JSONDecodeError.

At first, I thought it was the Pandas dataframe issues. I tried to diagnose the root. Even when I tried the example code also produced the same error.

JSONDecodeError                           Traceback (most recent call last)
[<ipython-input-95-761e26dba270>](https://localhost:8080/#) in <module>
      3 downloader = YoutubeCommentDownloader()
      4 comments = downloader.get_comments_from_url('https://www.youtube.com/watch?v=ScMzIvxBSi4', sort_by=SORT_BY_POPULAR)
----> 5 for comment in islice(comments, 10):
      6     print(comment)

3 frames
[/usr/lib/python3.7/json/decoder.py](https://localhost:8080/#) in raw_decode(self, s, idx)
    353             obj, end = self.scan_once(s, idx)
    354         except StopIteration as err:
--> 355             raise JSONDecodeError("Expecting value", s, err.value) from None
    356         return obj, end

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Is it because of the generator?

epireve avatar Sep 23 '22 23:09 epireve