Bug in DB creation on latest version

Register or login to post to the forum.
15 Nov, 2016 07:20

So after further investigation it appears there is a bug in the most up to date version of Tendenci when creating the DB on a new install. We were FINALLY able to get the install done by installing under an old version.

Here are the grotty details:

Applying files.0001_initial...Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/core/management/init.py", line 354, in execute_from_command_line utility.execute() File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/core/management/init.py", line 346, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv self.execute(*args, cmd_options) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute output = self.handle(*args, options) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 222, in handle executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 110, in migrate self.apply_migration(states[migration], migration, fake=fake, fake_initial=fake_initial) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 148, in apply_migration state = migration.apply(state, schema_editor) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/migrations/migration.py", line 115, in apply operation.database_forwards(self.app_label, schema_editor, old_state, project_state) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/migrations/operations/fields.py", line 62, in database_forwards field, File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/schema.py", line 94, in add_field super(PostGISSchemaEditor, self).add_field(model, field) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/schema.py", line 18, in add_field super(DatabaseSchemaEditor, self).add_field(model, field) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 384, in add_field definition, params = self.column_sql(model, field, include_default=True) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/schema.py", line 25, in column_sql return super(PostGISSchemaEditor, self).column_sql(model, field, include_default) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 146, in column_sql default_value = self.effective_default(field) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 198, in effective_default default = field.get_default() File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/models/fields/related.py", line 1947, in get_default field_default = super(ForeignKey, self).get_default() File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/models/fields/init.py", line 794, in get_default return self.default() File "/srv/tendenci/venv/local/lib/python2.7/site-packages/tendenci/apps/user_groups/utils.py", line 39, in get_default_group id=Group.objects.get_initial_group_id()) or [None])[0] File "/srv/tendenci/venv/local/lib/python2.7/site-packages/tendenci/apps/user_groups/managers.py", line 61, in get_initial_group_id group = self.get_or_create_default() File "/srv/tendenci/venv/local/lib/python2.7/site-packages/tendenci/apps/user_groups/managers.py", line 26, in get_or_create_default group = self.first() File "/srv/tendenci/venv/local/lib/python2.7/site-packages/tendenci/apps/user_groups/managers.py", line 19, in first [group] = groups[:1] or [None] File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 170, in nonzero return type(self).bool(self) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 166, in bool self._fetch_all() File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 965, in _fetch_all self._result_cache = list(self.iterator()) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 238, in iterator results = compiler.execute_sql() File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 840, in execute_sql cursor.execute(sql, params) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 79, in execute return super(CursorDebugWrapper, self).execute(sql, params) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/utils.py", line 98, in exit six.reraise(dj_exc_type, dj_exc_value, traceback) File "/srv/tendenci/venv/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) django.db.utils.InternalError: current transaction is aborted, commands ignored until end of transaction block

16 Nov, 2016 19:57

any chance you have a portion of the migrate terminal output to make it easier to see which migration is out of sync?

I do know we recently change the default value of "direct_mail" in "profiles" and "user_groups" to be boolean "true"

If not I will be doing another test install from scratch in vmware soon to check dependencies etc.

17 Nov, 2016 00:49

no sorry. don't have it

21 Nov, 2016 11:09

Hi 4EJeffe,

I've moved issue to https://github.com/tendenci/tendenci/issues/536.

You can update it with more details to help us troubleshoot the issue https://github.com/tendenci/tendenci/issues/536. And can you please link us to the installation docs you followed?

Thanks, Jenny

29 Nov, 2016 12:41

Thank you for reporting the issue! The issue has been resolved. Please try again.

Thanks, Jenny