You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in oTree 5 the player.in_round() funktion does not work with numpy interger datatypes.
For istance the following code leads to an error "Failed to create session: No corresponding Player found with round_number=1"
def creating_session(subsession: Subsession):
for p in subsession.get_players():
p.in_round(np.int64(1))
I tested the equivalent function in otree 3 and there it works with no issues.
While this is not a big issue since one can always convert to standart python integers, the error message here is not very helpful which makes it hard to debug.
EDIT:
numpy datatypes seem to cause issues in other situations as well. For instance storing numpy integers in an IntegerField does not seem to work as it should
The text was updated successfully, but these errors were encountered:
in oTree 5 the player.in_round() funktion does not work with numpy interger datatypes.
For istance the following code leads to an error "Failed to create session: No corresponding Player found with round_number=1"
I tested the equivalent function in otree 3 and there it works with no issues.
While this is not a big issue since one can always convert to standart python integers, the error message here is not very helpful which makes it hard to debug.
EDIT:
numpy datatypes seem to cause issues in other situations as well. For instance storing numpy integers in an IntegerField does not seem to work as it should
The text was updated successfully, but these errors were encountered: