Hi Pei=Hsun-
I see. Model field definitions in class Player can't access session instances or player instances because they're read/executed by oTree when oTree starts up - not when you're running a session - so session.config doesn't mean anything then, without an associated session.
Instead of assigning a value to a Player field from session.config inside of class Player, do it inside of creating_session. That runs when you create a session, and it takes subsession: Subsession as an argument, so you can get the subsession's Player and Session objects from there.
Thanks,
--Chris