#1 by Giovanni
Hi All,
I keep getting this error after opening rooms in Otree.
At first I am able to open rooms, but after 5 minutes the rooms close down and this error message appears.
I tried uploading the zip file again and also resetting db.
It fixes the issue for a couple of minutes, but then we are back in the same situation.
Any help would be appreciated.
Thanks
Giovanni
Failed to create session: (psycopg2.errors.UndefinedTable) relation "treat_assign_subsession" does not exist LINE 1: INSERT INTO treat_assign_subsession (round_number, session_i... ^ [SQL: INSERT INTO treat_assign_subsession (round_number, session_id) VALUES (%(round_number)s, %(session_id)s) RETURNING treat_assign_subsession.id] [parameters: {'round_number': 1, 'session_id': 5}] (Background on this error at: http://sqlalche.me/e/13/f405)
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
self.dialect.do_execute(
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 609, in do_execute
cursor.execute(statement, parameters)
psycopg2.errors.UndefinedTable: relation "treat_assign_subsession" does not exist
LINE 1: INSERT INTO treat_assign_subsession (round_number, session_i...
^
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.9/site-packages/otree/session.py", line 447, in create_session_traceback_wrapper
return create_session(**kwargs)
File "/app/.heroku/python/lib/python3.9/site-packages/otree/session.py", line 347, in create_session
db.commit()
File "/app/.heroku/python/lib/python3.9/site-packages/otree/database.py", line 187, in commit
return self._db.commit()
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1046, in commit
self.transaction.commit()
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 504, in commit
self._prepare_impl()
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 483, in _prepare_impl
self.session.flush()
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 2540, in flush
self._flush(objects)
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 2682, in _flush
transaction.rollback(_capture_exception=True)
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
compat.raise_(
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
raise exception
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 2642, in _flush
flush_context.execute()
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
rec.execute(self)
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/unitofwork.py", line 586, in execute
persistence.save_obj(
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/persistence.py", line 239, in save_obj
_emit_insert_statements(
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/persistence.py", line 1135, in _emit_insert_statements
result = cached_connections[connection].execute(
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
return meth(self, multiparams, params)
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement
ret = self._execute_context(
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context
self._handle_dbapi_exception(
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1510, in _handle_dbapi_exception
util.raise_(
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
raise exception
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
self.dialect.do_execute(
File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 609, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "treat_assign_subsession" does not exist
LINE 1: INSERT INTO treat_assign_subsession (round_number, session_i...
^
[SQL: INSERT INTO treat_assign_subsession (round_number, session_id) VALUES (%(round_number)s, %(session_id)s) RETURNING treat_assign_subsession.id]
[parameters: {'round_number': 1, 'session_id': 5}]
(Background on this error at: http://sqlalche.me/e/13/f405)