stefan2200 / TWB

Python based bot for Tribal Wars

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash error

herrchristensen opened this issue · comments

Hey,

I get this crash with the following lines:

2024-02-24 12:30:36 - FarmManager - INFO - Villages: 1
2024-02-24 12:30:36 - FarmManager - INFO - Reports: 2
2024-02-24 12:30:36 - FarmManager - INFO - Farms: 0
2024-02-24 12:30:36 - FarmManager - INFO - Total loot: {'wood': 0, 'iron': 0, 'stone': 0}
Dead for 3.750000.2 minutes (next run at: 12:34:21.406409)
2024-02-24 12:34:28 - Requests - DEBUG - GET https://en138.tribalwars.net/game.php?screen=overview_villages [200]
2024-02-24 12:34:28 - Requests - DEBUG - Set CSRF token
2024-02-24 12:34:31 - Requests - DEBUG - GET https://en138.tribalwars.net/game.php?village=53938&screen=overview [200]
2024-02-24 12:34:31 - Requests - DEBUG - Set CSRF token
I crashed :(   'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/home/rik/Downloads/TWB-master/twb.py", line 377, in <module>
    t.start()
  File "/home/rik/Downloads/TWB-master/twb.py", line 371, in start
    self.run()
  File "/home/rik/Downloads/TWB-master/twb.py", line 314, in run
    vil.run(config=config, first_run=vnum == 1)
  File "/home/rik/Downloads/TWB-master/game/village.py", line 92, in run
    "Village %s" % self.game_data["village"]["name"]
TypeError: 'NoneType' object is not subscriptable
2024-02-24 12:34:36 - Requests - DEBUG - GET https://en138.tribalwars.net/game.php?screen=overview [200]
2024-02-24 12:34:36 - Requests - DEBUG - Set CSRF token
2024-02-24 12:34:36 - Requests - WARNING - Current session cache not valid

Is there something wrong in my config, or is this a bug? :)

Try to delete the session.json file inside the cache folder and run the command again (set again the cookie etc)