Randomize Page Sequence

58 views
Skip to first unread message

Hyoeun Park

unread,
Apr 16, 2021, 10:49:32 AM4/16/21
to oTree help & discussion
Hi All,

I have a problem with page randomization sequence.
I tried to follow the snippet you posted but it did not work.
(I tried with and without @staticmethod, but nothing worked.)

Of course, I added PARTICIPANT_FIELDS = ['task_rounds'] to settings.py file.
but whenever I run a code, 
I have the following code,
Screen Shot 2021-04-16 at 10.43.45 AM.png

Screen Shot 2021-04-16 at 10.44.54 AM.png

but whenever I run a code, I got the following error message.
Screen Shot 2021-04-16 at 10.47.49 AM.png

If anyone can help me, I would appreciate it.

Thanks!

Hyoeun

Chris @ oTree

unread,
Apr 16, 2021, 11:03:11 AM4/16/21
to oTree help & discussion
In the new format, Subsession/Group/Player should not have any function definitions inside them. Instead you define top-level functions. See here for guidance: https://www.otree.org/newformat.html

Hyoeun Park

unread,
Apr 16, 2021, 11:15:25 AM4/16/21
to oTree help & discussion
It works now!!!

Thanks a lot Chris!

2021년 4월 16일 금요일 오전 11시 3분 11초 UTC-4에 Chris @ oTree님이 작성:
Reply all
Reply to author
Forward
0 new messages