Instapy: Running error suddenly occurring, no previous issue with script

Created on 21 May 2018  路  1Comment  路  Source: timgrossmann/InstaPy

Script has been working perfectly fine for weeks until now, here's the traceback.

$ python quickstart.py
Traceback (most recent call last):
File "quickstart.py", line 22, in
multi_logs=True)
File "C:usersusername\instapy\instapy\instapy.py", line 119, in __init__
self.follow_restrict = load_follow_restriction(self.logfolder)
File "C:usersusername\instapy\instapy\unfollow_util.py", line 822, in load_f ollow_restriction
return json.load(followResFile)
File "C:\Users\Username\AppData\Local\Programs\Python\Python36-32\lib\json__i nit__.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "C:\Users\Username\AppData\Local\Programs\Python\Python36-32\lib\json__i nit__.py", line 354, in loads
return _default_decoder.decode(s)
File "C:\Users\Username\AppData\Local\Programs\Python\Python36-32\lib\json\dec oder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\Username\AppData\Local\Programs\Python\Python36-32\lib\json\dec oder.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)

(edit: tried to update the files by doing git pull before posting this issue)

Most helpful comment

Found solution:

"It possibly happened after you've forcibly ended some session where it corruptly dumped data to JSON file,
for solution, either find that corrupt element in followRestriction.json file and fix it or just reset that file (keep only this in there: {})

note that followRestriction.json file keeps records to be used with follow_times parameter"

Solved by deleting followrestiction.json file (attempting to git pull to replace it, but don't think this made any difference) and starting up the script again, works fine now. thanks alot to @uluQulu

>All comments

Found solution:

"It possibly happened after you've forcibly ended some session where it corruptly dumped data to JSON file,
for solution, either find that corrupt element in followRestriction.json file and fix it or just reset that file (keep only this in there: {})

note that followRestriction.json file keeps records to be used with follow_times parameter"

Solved by deleting followrestiction.json file (attempting to git pull to replace it, but don't think this made any difference) and starting up the script again, works fine now. thanks alot to @uluQulu

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CharlesCCC picture CharlesCCC  路  3Comments

harrypython picture harrypython  路  3Comments

ingorichter picture ingorichter  路  3Comments

tibor picture tibor  路  3Comments

drcyber975 picture drcyber975  路  3Comments