oTree Forum >

waiting_players not showing all players

#1 by chasmani

Hi

Great project, thank you very much. I'm using oTree 5.8.4. 

I have an experiment where participants go through a Consent form individually, and then are grouped in the next app based on their arrival time. It looks like the group_by_arrival_time_method is not picking up all the waiting_players, and so is not grouping them up as I want them to. 

Here is a minimal example. In the second app's __init__.py I have this:

	class C(BaseConstants):
	    NAME_IN_URL = 'effort'
	    PLAYERS_PER_GROUP = 4

	def group_by_arrival_time_method(self, waiting_players):
	    
	    print("\nWaiting players are ", waiting_players)
	
	class SetGroupsWaitPage(WaitPage):
	
	    group_by_arrival_time = True
	    
	page_sequence = [SetGroupsWaitPage]

	etc

In the output I am getting e.g. 

	Waiting players are  []
	or
	Waiting players are  [Player(round_number=1, id_in_group=2)]
	or 
	Waiting players are  [Player(round_number=1, id_in_group=1), Player(round_number=1, id_in_group=2)]
	
But there are actually 4 players waiting. It isn't picking them all up. It seems to be more likely to pick a waiting player up if their wait page has recently been refreshed. The session is being run with 8 total players. 

I really have no idea what I am doing wrong here. Any help? 
Best
Charlie

#2 by Chris_oTree

This sounds like the intended behavior in oTree 5.8: https://groups.google.com/g/otree/c/RZObx8UzrgM/m/ZOx_8Ue7CAAJ

If you switch back to those tabs, even for just a second, it should pick up those players again (but will drop them again after a minute or less). Let me know what you observe.

Write a reply

Set forum username