cquest / tootbot

python bot to clone tweets to a mastodon account
GNU Affero General Public License v3.0
101 stars 35 forks source link

JSON decode error when parsing Twitter posts (jq on Windows) #16

Open Dinth opened 1 year ago

Dinth commented 1 year ago

Im getting this error when im trying to run the script:

dinth1906
---------------------------
Traceback (most recent call last):
  File "/home/dinth/tootbot/tootbot.py", line 158, in <module>
    d = json.load(open('tweets.json','r'))
  File "/usr/lib/python3.10/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.10/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)
produnis commented 1 year ago

Me too, same error....

loxK commented 1 year ago

Guys, install the jq utility :

apt install jq

@cquest add it to the readme please

produnis commented 1 year ago

thanks a lot loxK, installing jq solved the problem for me...

Arnaud-Albrecht commented 1 year ago

I did install it, but to no avail, i'm on windows though.