oTree Forum >

Bug when exporting: AssertionError on data export: round x has 0 players.

#1 by DavidP

I am encountering what I am assuming to be a bug in the export procedure.
When I try to export data for all apps, I get an alert "Error exporting data. Check the server logs for details."

The server logs show this:
AssertionError: Session 06yzrtpz has 4 participants, but round 1 of app 'MyApp' has 0 players. The number of players in the subsession should always match the number of players in the session. Please report this issue and then reset the database.

Downloading the data just for "Myapp" works. However, I'd like to download the wide format, if at all possible.

The offending session is a demo session and thus not in the session list when I click "sessions" at the top. So there is no frontend-way to simply delete it.

Chris/anyone seen this error before? Any remedy? Resetting the database as suggested is clearly not what I want, as it contains data I want to keep.

I also have a guess what happened and how to recreate the problem:
Earlier, this app had a small bug, because one IntegerField had initial=False. This is no problem with local testing in sqlite, but once I switched to Postgres on heroku, initializing a session would cause an error. (Because prostgres apparently doesn't just cast false to 0 then). I assume this is one of these sessions.

Best,
David

Write a reply

Set forum username