File "/home/thomas/Documents/src/Codenames/lobby_handlers.py", line 84, in client_connect
data=cookie
File "/home/thomas/Documents/src/Codenames/game_manager.py", line 57, in handle_client_event
client, events = client_manager.handle_event(self.game_code, client_id, client_event, data)
File "/home/thomas/Documents/src/Codenames/client_manager.py", line 74, in handle_event
client = self.restore_client(existing_id)
File "/home/thomas/Documents/src/Codenames/client_manager.py", line 212, in restore_client
avatar = Player._get_avatar(self.used_avatars, pref=player.avatar)
File "/home/thomas/Documents/src/Codenames/player.py", line 40, in _get_avatar
raise ValueError('Out of avatars')
ValueError: Out of avatars
I think this happens because, every time the page is refreshed, all players tied to the device are assigned a new avatar by the server but don't end up using it on the client.
yeah this is a really weird issue. i think it has to do with the cookie identifying a client gets lost, and then there end up being dangling clients in the lobby taking up avatars.
I think this happens because, every time the page is refreshed, all players tied to the device are assigned a new avatar by the server but don't end up using it on the client.