No idea how to fix this error

i dont know how im supposed to fix this error:

Player 1 Errors:

Random seed: 4877006227868190628
---------------- Starting Your Algo --------------------
Configuring your custom algo strategy…
Performing turn 0 of your custom algo strategy
Traceback (most recent call last):
File “//”, line 312, in
File “/gamelib/”, line 74, in start
File “//”, line 56, in on_turn
File “//”, line 86, in starter_strategy
File “/gamelib/”, line 374, in attempt_spawn
if type(locations[0]) == int:
TypeError: ‘NoneType’ object is not subscriptable

list.remove(item) returns None, not the updated list, so “locations” is unexpectedly None in attempt_spawn, causing the error.

1 Like