koenrh / delete-tweets

Delete tweets from your timeline.
ISC License
792 stars 107 forks source link

JSON error #103

Closed rogard closed 3 years ago

rogard commented 3 years ago

I ran into this error. Does tweet.js have to meet any requirement?

$ delete-tweets --until 2019-12-31 tweet.js
Traceback (most recent call last):
  File "/home/er/.local/bin/delete-tweets", line 11, in <module>
    sys.exit(main())
  File "/home/er/.local/lib/python3.6/site-packages/deletetweets/__main__.py", line 55, in main
    args.min_likes, args.min_retweets, args.dry_run)
  File "/home/er/.local/lib/python3.6/site-packages/deletetweets/deletetweets.py", line 69, in delete
    tweets = json.loads(tweetjs_file.read()[25:])
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
rogard commented 3 years ago

tweet.js must be that in the archive.