#1 by StudentFun
Hi everyone, Student working on my first oTree project here. When I deploy my project locally it works without hiccups but when I use heroku to get it online I experience a problem. Deployment itself works with the message "Your app was successfully deployed." popping up. Unfortunately when following the resulting link I cant start a session and get the following error message. "Failed to create session: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely) (sqlite3.OperationalError) table conjoint_player has no column named participantcode" As local deployment works fine and the code is identical I am at a loss why the variable is not found when it appears in models, pages and the page template. I hope someone can help me out here thanks in advance!
#2 by rcar
Were you able to figure it out? I have the same problem. Mine is: Failed to create session: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely) (sqlite3.OperationalError) table lifeCopy_player has no column named num_failed_attempts
#3 by Daniel_Frey
Did you reset the database? After that, try again to create a session.
#4 by rcar
Forgive me for the stupid question, but how do I do that?
#5 by rcar
I used this: Step 1: heroku restart Step 2: heroku pg:reset DATABASE (no need to change the DATABASE) Step 3: heroku run rake db:migrate Step 4: heroku run rake db:seed (if you have seed) But it didn't work
#6 by Daniel_Frey
Sorry for the late reply, I was on paternity leave :) Try this command: heroku run otree resetdb