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
1 answer

oTree - modify the 'Configure Session' segment dynamically

I recently started using oTree to build an extensive-form game, and I want to be able to determine the role of each participant in each round when creating a session. Is it possible to change the SESSION_CONFIGS dictionary dynamically (depends on…
rzarviv
  • 43
  • 4
0
votes
1 answer

Heroku Slug Size

I have a python app built on oTree software which I am trying to upload onto and deploy from Heroku. However, I keep getting an error that my slug size is too big. It is around 40 M more that the 500 M that Heroku allows. I have added a .gitignore.…
Kavan Tej
  • 1
  • 1
0
votes
1 answer

Saving data from form to database using Django in otree game design

I want to post the data from a form to database. I am not sure how to do this. The form is generated from a model, the model has two foreign keys, I want to assign value to them in the page process. But it does not work. Any one have any idea?…
0
votes
1 answer

Otree save static results page

I am using OTree to run a number of different app/games/experiments in a session. Currently the results of each app is displayed within the app as the last page. But I wish to hold of displaying any results until after all apps have been run, in a…
0
votes
0 answers

What does this permission-denied error mean?

Error: I tried to put my oTree experiment game in the devserver and this error occours. I do not now, what it means, as it has nothing to do with my code I guess? Request Method: GET Request URL:…
Rebecca
  • 11
0
votes
0 answers

SyntaxError when starting an otree project on Virtual Studio Code (MacOS)

I started using VSC to code with otree a couple of weeks ago and everything was going smoothly. Today, I started a new project so I went to Terminal and typed cd otree Followed by otree startapp project And then I got Traceback (most recent call…
0
votes
1 answer

Range bar otree

I am having problem to put a double range slider in Otree. ¿Someone can explain me, what is the easiest way to do that?. I was wondering that maybe I have to import some new widgets, but I don't know how to start, is this right?
0
votes
1 answer

Python: Simple Counter in Otree

I am trying to implement a simple score counter in Otree (Python Library) by modifying the quiz game template to make it two players. Eventually, I want this counter to update only on certain conditions, but for now, I'm just trying to add 10 after…
Parseltongue
  • 11,157
  • 30
  • 95
  • 160
0
votes
1 answer

Writing a for loop with an IntegerField rather than an int

I'm trying to create a for loop for creating a dynamic number of objects in Otree, which extends Django (I know, crazy idea, but bear with me). Unfortunately the latest version of otree will throw compile time errors if you attempt to use integers…
Krabo
  • 31
  • 6
0
votes
1 answer

how to test inline formset

There is an inline formset that works perfectly well. It fails only in testing. there is a model that connects two types of participants: senders and receivers. models.py: class SendReceive(models.Model): receiver =jmodels.ForeignKey(Player,…
Philipp Chapkovski
  • 1,949
  • 3
  • 22
  • 43
0
votes
1 answer

how to pass the parameter to a form during formset creation

I have an inline formset in Django. And I wonder how can I set some max_value for a form that is in this formset based on the instance parameters. The problem is that when we create a formset by using inlineformset_factory we pass there not an…
Philipp Chapkovski
  • 1,949
  • 3
  • 22
  • 43
-1
votes
1 answer

b' at start of line - error in django template parsing

I'm trying to follow the public goods tutorial for oTree, but my templates are giving syntax errors. I'm using vim to edit (and in this case create) the templates, but when I try to run otree resetdb It returns the following…
Ty Hayes
  • 178
  • 10
-1
votes
2 answers

oTree: How to access the player's id from the player class in model.py?

I would like to define a parameter variable via the default attribute id_in_group of the player. However, this attribute does not seem to be accessible via the ways I could think of (such as via BasePlayer.id_in_group). The code of the class…
Aqqqq
  • 816
  • 2
  • 10
  • 27
-2
votes
1 answer

None error when comparing words using the lenght of themselves

I am trying to place a restriction on the minimum number of characters that a subject can use in a form field using Otree. I want that if the subjects put a name that is less than 4 characters long, the application shows them an error that says they…
1 2 3 4 5 6
7