google-marketing-solutions/crmint

Sowing DB seeds fails

jmeekins opened this issue · 3 comments

During install of the application to an google environment an error occurs during Sowing DB Seeds

crmint cloud deploy

Deploy
---> Get current project identifier
Project ID found: crmint-merkle-test
---> Install required packages (1/3)
---> Install required packages (2/3)
---> Install required packages (3/3)
Working directory: /tmp/crmint-merkle-test
---> Copy source code to working directory (1/6)
---> Copy source code to working directory (2/6)
---> Copy source code to working directory (3/6)
---> Copy source code to working directory (4/6)
---> Copy source code to working directory (5/6)
---> Copy source code to working directory (6/6)
---> Install backends dependencies (1/6)
---> Install backends dependencies (2/6)
---> Install backends dependencies (3/6)
---> Install backends dependencies (4/6)
---> Install backends dependencies (5/6)
---> Install backends dependencies (6/6)
---> Deploy frontend service (1/3)
---> Deploy frontend service (2/3)
---> Deploy frontend service (3/3)
---> Deploy backend services (1/4)
---> Deploy backend services (2/4)
---> Deploy backend services (3/4)
---> Deploy backend services (4/4)
---> Deploy the dispatch.yaml rules
---> Start CloudSQL proxy (1/4)
---> Start CloudSQL proxy (2/4)
---> Start CloudSQL proxy (3/4)
---> Start CloudSQL proxy (4/4)
---> Configure Cloud SQL proxy settings
---> Applying database migrations
---> Sowing DB seeds

Sowing DB seeds: Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/tmp/crmint-merkle-test/backends/lib/flask/main.py", line 15, in
main(as_module=True)
File "/tmp/crmint-merkle-test/backends/lib/flask/cli.py", line 513, in main
cli.main(args=args, prog_name=name)
File "/tmp/crmint-merkle-test/backends/lib/flask/cli.py", line 380, in main
return AppGroup.main(self, *args, **kwargs)
File "/tmp/crmint-merkle-test/backends/lib/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/tmp/crmint-merkle-test/backends/lib/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/tmp/crmint-merkle-test/backends/lib/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/tmp/crmint-merkle-test/backends/lib/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/tmp/crmint-merkle-test/backends/lib/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/tmp/crmint-merkle-test/backends/lib/flask/cli.py", line 257, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/tmp/crmint-merkle-test/backends/lib/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/tmp/crmint-merkle-test/backends/flask_tasks.py", line 23, in db_seeds
database.load_fixtures(logger_func=click.echo)
File "/tmp/crmint-merkle-test/backends/core/database.py", line 63, in load_fixtures
general_setting = models.GeneralSetting.where(name=setting).first()
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy_mixins/smartquery.py", line 305, in where
return cls.smart_query(filters)
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy_mixins/smartquery.py", line 247, in smart_query
query = cls.query
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy_mixins/utils.py", line 12, in get
return self.fget(owner_cls)
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy_mixins/session.py", line 35, in query
return cls.session.query(cls)
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/orm/scoping.py", line 163, in do
return getattr(self.registry(), name)(*args, **kwargs)
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/orm/session.py", line 1584, in query
return self._query_cls(entities, self, **kwargs)
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/orm/query.py", line 197, in init
self._set_entities(entities)
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/orm/query.py", line 225, in _set_entities
self._set_entity_selectables(self._entities)
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/orm/query.py", line 256, in _set_entity_selectables
ent.setup_entity(*d[entity])
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/orm/query.py", line 4297, in setup_entity
self._with_polymorphic = ext_info.with_polymorphic_mappers
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/util/langhelpers.py", line 883, in get
obj.dict[self.name] = result = self.fget(obj)
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/orm/mapper.py", line 2157, in _with_polymorphic_mappers
configure_mappers()
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/orm/mapper.py", line 3301, in configure_mappers
mapper._post_configure_properties()
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/orm/mapper.py", line 1966, in _post_configure_properties
prop.init()
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/orm/interfaces.py", line 197, in init
self.do_init()
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/orm/relationships.py", line 2076, in do_init
self._process_dependent_arguments()
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/orm/relationships.py", line 2105, in _process_dependent_arguments
setattr(self, attr, attr_value())
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/ext/declarative/clsregistry.py", line 326, in call
x = eval(self.arg, globals(), self._dict)
File "", line 1, in
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/ext/declarative/clsregistry.py", line 219, in getattr
if key not in mp.all_orm_descriptors:
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/util/langhelpers.py", line 883, in get
obj.dict[self.name] = result = self.fget(obj)
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/orm/mapper.py", line 2455, in all_orm_descriptors
dict(self.class_manager._all_sqla_attributes())
File "/tmp/crmint-merkle-test/backends/lib/sqlalchemy/orm/instrumentation.py", line 152, in _all_sqla_attributes
inherits = supercls.mro[1]
IndexError: tuple index out of range

Command: . env/bin/activate && python -m flask db-seeds

---> Stop CloudSQL proxy
Done

Slony commented

Hey @jmeekins thank you for reporting this. Please, try deploying from the dev branch instead: Deploy CRMint on Google Cloud Platform from the dev branch.

Please let me know if it helps.

@Slony I had the sam problem. Deploying from dev works fine.

We are closing this issue since the new release of CRMint 2.0 should fix this issue, please see the details in the mentioned above.