ImportError: cannot import name 'Page'

Question:

I have written a game in an Otree Project, but every time i want to clean my database or start the server, this message appears. It only happens with my game, but not when an example game is using that command.enter image description here

Asked By: Marco Gutiérrez

||

Answers:

Look in your app for the folder _builtin. There should be a file __init__.py that has the same contents as every other app’s _builtin/__init__.py. If not, copy it from the other app.

Answered By: Chris

I’m getting a similar error when trying to track the time via Chapkovski and Zihlmann’s (2019) proposed code get_time_per_page:

from otree.models_concrete import PageCompletion
ImportError: cannot import name ‘PageCompletion’ from ‘otree.models_concrete’

Any ideas how to solve that, I’d be very grateful (:

Answered By: Frieder Neunhoeffer
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.