oTree Forum >

Error when trying to import Player/Page class from a separate file

#1 by llinfeng (edited )

I'm prompted with the error message as attached when I attempt to do two things:
1. To import the Player model from a standalone script, where I was prompted with a message stating "AttributeError: entity".
2. To import a Page class from a separate script.

I've made two commits to illustrate the two attempts mentioned above:
* For Player import error, see: https://github.com/UMBEE/modified-otree-snippets/commit/8e934f9fd2bad04d51be1b59ff5f6aa19fad90b7
* For Page class import error, see: https://github.com/UMBEE/modified-otree-snippets/commit/6e43e65f921bf8034b41a2b7fb5fabde56a39b30

Per the exercises mentioned above, I was using oTree version 5.9.3.

Many thanks in advance :)

Write a reply

Set forum username