ZracheSs-xyZ/PayoutScript-xyZ

Facing issues with the script (have not changed any codes other than scholar info)

Xerascal opened this issue · 2 comments

root@DESKTOP-82:/mt/c/Users/PC/Desktop/PayoutScript-xyZ-main# python3 payoutscript-xyz.py slp-payout-config.json
*** Welcome to the SLP Payout program *** (2022-03-01 23:50:01.907225)
Traceback (most recent call last):
File "payoutscript-xyz.py", line 55, in
accounts = json.load(f)
File "/usr/lib/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
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 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 10 column 9 (char 453)
root@DESKTOP-82:/mt/c/Users/PC/Desktop/PayoutScript-xyZ-main#

EtWnn commented

The error message seems to indicate that when you changed the scholar info, you wrote a wrongly formated json:
check that property names are well enclosed in double quotes in your file

Don't remove anything in the bracket!

"Scholars":[
{
"Name": "Scholar 1",
"PrivateKey": "0x",
"AccountAddress": "ronin:<from_address>",
"ScholarPayoutAddress": "ronin:<scholar_address>",
"ScholarPayoutPercentage": 0.5,
"ScholarPayoutPercentage_description": "Value between 0 and 1. Represents the percentage the scholar will receive. The rest is sent to the academy."
},

Even the "ScholarPayoutPercentage_description" is needed!