Hello.
Some times, the script fails with the indicated error.
We have noticed that Eth Netstats could give a non integer value for Best Block field over websocket and it makes the script to enter the exception on getHighestBlock function. We have included another try block that seems to solve the problem:
try:
if (res_json['action']=='block'):
if (int(res_json['data']['block']['number']) > highestBlock):
highestBlock = int(res_json['data']['block']['number'])
idx += 1
except Exception:
time.sleep(0.5)
pass # We could receive non integer value
I'm not an experienced developer and I don't know if this code is the best way to achieve a solution, but I hope that this helps to show the problem.
Best regards.