openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #25486
[Bug 1403812] Re: Traceback when importing OpenLP2 sqlite DB
It seems that the DB has been changed in some way, so we'll ignore this
for now. If similar issues are reported later we'll look at it again.
** Changed in: openlp
Status: New => Invalid
--
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1403812
Title:
Traceback when importing OpenLP2 sqlite DB
Status in OpenLP - Worship Presentation Software:
Invalid
Bug description:
Import the song db from
http://support.openlp.org/scp/tickets.php?id=2606 using the OpenLP2
song importer gives the traceback below with current trunk.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/relationships.py", line 197, in _determine_joins
consider_as_foreign_keys=consider_as_foreign_keys
File "/usr/lib/python3/dist-packages/sqlalchemy/sql/util.py", line 396, in join_condition
"between '%s' and '%s'.%s" % (a.description, b.description, hint))
sqlalchemy.exc.NoForeignKeysError: Can't find any foreign key relationships between 'songs' and 'song_books'.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tgc/OpenLP/trunk/openlp/core/ui/wizard.py", line 223, in on_current_id_changed
self.perform_wizard()
File "/home/tgc/OpenLP/trunk/openlp/plugins/songs/forms/songimportform.py", line 354, in perform_wizard
importer.do_import()
File "/home/tgc/OpenLP/trunk/openlp/plugins/songs/lib/importers/openlp.py", line 161, in do_import
source_songs = self.source_session.query(OldSong).all()
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/scoping.py", line 149, in do
return getattr(self.registry(), name)(*args, **kwargs)
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/session.py", line 1107, in query
return self._query_cls(entities, self, **kwargs)
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 115, in __init__
self._set_entities(entities)
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 124, in _set_entities
self._set_entity_selectables(self._entities)
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 157, in _set_entity_selectables
ent.setup_entity(*d[entity])
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 2914, in setup_entity
self._with_polymorphic = ext_info.with_polymorphic_mappers
File "/usr/lib/python3/dist-packages/sqlalchemy/util/langhelpers.py", line 618, in __get__
obj.__dict__[self.__name__] = result = self.fget(obj)
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/mapper.py", line 1464, in _with_polymorphic_mappers
configure_mappers()
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/mapper.py", line 2169, in configure_mappers
mapper._post_configure_properties()
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/mapper.py", line 1281, in _post_configure_properties
prop.init()
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/interfaces.py", line 231, in init
self.do_init()
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/properties.py", line 1030, in do_init
self._setup_join_conditions()
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/properties.py", line 1104, in _setup_join_conditions
can_be_synced_fn=self._columns_are_mapped
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/relationships.py", line 114, in __init__
self._determine_joins()
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/relationships.py", line 218, in _determine_joins
% self.prop)
sqlalchemy.exc.NoForeignKeysError: Could not determine join condition between parent/child tables on relationship OldSong.book - there are no foreign keys linking these tables. Ensure that referencing columns are associated with a ForeignKey or ForeignKeyConstraint, or specify a 'primaryjoin' expression.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1403812/+subscriptions
References