chief-gant / SplinterlandsTraderBot

A trading bot written in Python that makes a profit by buying underpriced cards and quickly reselling them.
18 stars 0 forks source link

Bot crashing occasionally #8

Closed knightblaster closed 2 years ago

knightblaster commented 2 years ago

Had a few crashes recently... not sure exactly what is happening... but here is a recent example:

Checking latest blocks...

Updating our posts We match the lowest price of: Crystal Werewolf Traceback (most recent call last): File "splinterlands_trader_bot.py", line 745, in File "splinterlands_trader_bot.py", line 734, in run File "splinterlands_trader_bot.py", line 558, in update_posts File "splinterlands_trader_bot.py", line 558, in TypeError: string indices must be integers

chief-gant commented 2 years ago

Hey! It's hard to reproduce the crash because I feel it's related to API problems, which might be either the API being down/slow or the bot reaching the limit of API calls.

In either case, since the solution is to wait, I added an exception that should avoid the crash. The script is already updated in the repo, I couldn't test it (the error didn't happen yet), but let me know if it works for you.

knightblaster commented 2 years ago

Awesome, thanks! Will git pull and test... I will let you know if any further issues... in the meantime, happy new years!

chief-gant commented 2 years ago

It appears it worked! I will wait until tomorrow to close the issue. Happy new year!

knightblaster commented 2 years ago

Yup, it definitely seems to have worked. I will close this now, and open a new one if I encounter anything else. Cheers mate!