Otree: how to access participant.id_in_session

64 Views Asked by At

I am trying to access the variable 'id_in_session', which I see in the data export

enter image description here

but when I refer to it as I would to normal participant variables

 player.participant.vars['id_in_session']

it does not work. Is it possible to work with these automatically created participant variables like 'id_in_session'?

1

There are 1 best solutions below

0
Papayapap On

The problem was to use

player.participant.vars['id_in_session']

instead of

player.participant.id_in_session

Apparently, this variables is not stored in the vars.