Questions tagged [otree]

oTree is a Python framework for multiplayer decision games, behavioral experiments, and surveys

oTree is a Python framework for multiplayer decision games, behavioral experiments, and surveys.

104 questions
0
votes
0 answers

Random allocation to groups

I am coding a group treatment. I realised that there are several ways to randomly allocate players to groups. I am trying to understand which one is better suited for my experiment. For now, I am using subsession.group_randomly() and I am getting…
0
votes
0 answers

Unexpected errors in oTree

Recently, I have experienced two unexpected errors. I was re-testing my codes for an app. The codes have no errors. However, I started getting error messages for another app which I wasn't testing and which also doesn't have any errors. I am not…
0
votes
0 answers

oTree: USE_POINTS=True in one app and False in another?

I'm designing an experiment in oTree which uses points during the main part but in the questionnaires, I'd like it to use currency instead. The last thing I tried was this, in settings.py: for app in SESSION_CONFIGS[0]["app_sequence"]: if app ==…
Leni
  • 1
  • 2
0
votes
0 answers

Int64 to Int on Otree survey

I'm trying to host an Otree survey but I keep getting an error directed at this line of code that says "relevant_index should be set to int, not int64." I have tried to use a.astype(int) but I'm still getting the error... can someone help me? def…
Kiara
  • 1
  • 1
0
votes
0 answers

Payoff generation for group treatments in oTree

I have a problem in generating payments for group members. So this is what we intend to do. Each group has two players and each one of then can select two assets: A and B. If both players select asset A or asset B and a random number gets…
0
votes
0 answers

javascript/python/otree: Slider Input Check AttributeError

I have been using the code by Vincent van Pelt https://www.accountingexperiments.com/post/sliders/ to implement a slider in my otree experiment and it works nicely besides that if I try to follow his tutorial on the slider input check, I always get…
Lilly
  • 1
0
votes
0 answers

Earning in excel file

This is my first experience with oTree. So I am not entirely sure if this is normal. I am testing my experiment now and while the payoff is showing in the excel data file, I am unable to see the earning. It's not that much of a problem since we just…
0
votes
1 answer

Rounding payoffs in otree

I am quiet new to oTree and to programming as such. My problem is with the rounding up of my payoff. So, £11.50 becomes £12.00. I tried my best to figure out a way to stop this but haven't been able to figure out anything yet. I have created a…
0
votes
0 answers

Problems with let otree devserver run

I have a Python Code to conduct an experiment. To ensure that the Code is working smoothly I wanted to run a trial round via 'otree devserver', but I always get an AttributeError message and I am stuck here. Can anyone help me out? I have downloaded…
Steve
  • 1
  • 2
0
votes
0 answers

Failed to create session: 'staticmethod' object is not callable Traceback (most recent call last)

I'm trying to solve this issue in OtreeHub, Failed to create session: 'staticmethod' object is not callable Traceback (most recent call last): File "/app/.heroku/python/lib/python3.9/site-packages/otree/session.py", line 447, in…
0
votes
0 answers

Update dictionary value in class a from class b-Python

I set multi dictionary in my constant class and need to update it several times on different pages based on different logic on each page. However, when I retrieve instances of my dictionary that I updated on my HTML page, I get initial values. I…
Marian
  • 11
  • 2
0
votes
1 answer

How to access data from custom_export in Otree?

I am trying to use ExtraModel and custom_export to export data from live_pages. However, when I go on devserver and check the data tab, it is nowhere to be found. If I download the excel (bottom right of the page) the new variables are not included…
Papayapap
  • 212
  • 2
  • 12
0
votes
0 answers

Managing drop outs without WaitPage in oTree

I have an experiment which assigns players with unique characteristics (there are 25 unique combinations). However, I will be running this experiment on Prolific, hence, player drop outs is a problem. Is there a way to ensure that the next player…
0
votes
0 answers

unable to create a session on heroku app: otree_participant has no column named _waitpage_is_connected

I am trying to deploy an otree/heroku app on prolific. I have so far created a player variable: prolific_id = models.StringField() Additionally on one of the earlier apps, I set the prolific_id player variable to the participant.label and adjusted…
0
votes
0 answers

Prevent dragging an item across rows

I have created a drag-drop task, where an individual is trying to unscramble a sentence. 4 of 5 words make a sentence and the individual takes the last word and drags it to the end where it is outlined in red to signify it was the uneeded word. I…
zotzotzot
  • 1
  • 1