piston-cli
piston-cli copied to clipboard
'Nonetype' object is not subscriptable error
Occasionally (every 10-20 votes or so) my bot fails with this error:
Traceback (most recent call last):
File "./votingbot.py", line 113, in
This is weird .. the props variable should have been filled from the API node .. I guess this is rather a connectivity issuer ..
It seems that my bot is able to handle lost connections successfully, so I'm not sure that is the problem. I'm not sure if it is related, but I also get these errors occasionally:
Traceback (most recent call last):
File "./votingbot.py", line 113, in
Also my voting function already catches broadcasting errors like so:
def vote(c, weight):
try:
c.vote(weight, account)
except BroadcastingError as e:
print("Vote failed...")
print(str(e))