browser bots, possible threading issue?

83 views
Skip to first unread message

ccr...@gmail.com

unread,
Jun 3, 2021, 6:30:29 PM6/3/21
to oTree help & discussion
Hi all -



In oTree 3.3.11, I'm trying to test some software with browser bots, but I'm running into a strange issue:

(1) my code print statements (inside my models.py) are printing that a group field has been set to a value (and prints that value) at the time I expect.
(2) then later when my tests.py bots get to a spot where they need to test that value, print statements there show the value as None  - this causes the bots to head to the wrong next page (they would be yielding an extra page before the Results page based on the value of this field)
(3) While the browser bots are showing the AssertionError when they're on the wrong page, the oTree session's data tab shows that this group field has the value printed out in models.py before, and is not None

And finally:  this tests.py code does not have this problem running command-line bots.  Just browser bots.

Any ideas why command-line bot code would work, but browser bots would have this field value disappearing when the rest of oTree sees it has had its value assigned?

Thanks,
--Chris


Chris @ oTree

unread,
Jun 3, 2021, 11:18:02 PM6/3/21
to oTree help & discussion

ccr...@gmail.com

unread,
Jun 4, 2021, 2:30:20 PM6/4/21
to oTree help & discussion
Hi Chris -

Yes,  I forgot about that.  I'm using a player=self.player at the beginning of my play_rounds function.

Thanks,
--Chris

Reply all
Reply to author
Forward
0 new messages