← Back to team overview

openlp-core team mailing list archive

[Bug 661867] Re: Invalid author added in song dialog

 

Hm... I cannot reproduce this... what I did:

1) create a new song (enter title and a verse)
2) go to the "Authors, Topic & Song Book" tab and type in a author name.
3) press enter

Then a dialog pop up saying that the song does not have an author and
asking if I want to continue without an author or not.

Was that the right procedure?

-- 
Invalid author added in song dialog
https://bugs.launchpad.net/bugs/661867
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.

Status in OpenLP - Worship Presentation Software: New

Bug description:
Hi, I just faced a error. 
What I did: I created a new song. I typed a new author name in the QComboBox and applied with the return key. The dialog tried to close.
Now I had a new author in the list called 'None'. In the database maintaining dialog I found neither the authors name nor the name 'None'. After deleting the author from the list of the song I tried to add it again. I typed the full name, but 'None' appeared in the list. Now every song database access results in the second traceback. 

Traceback (most recent call last):
  File "/home/meinert/Qt/OpenLP/trunk/openlp/plugins/songs/forms/editsongform.py", line 625, in accept
    if self.saveSong():
  File "/home/meinert/Qt/OpenLP/trunk/openlp/plugins/songs/forms/editsongform.py", line 664, in saveSong
    self.songmanager.save_object(self.song)
  File "/home/meinert/Qt/OpenLP/trunk/openlp/core/lib/db.py", line 152, in save_object
    self.session.commit()
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/scoping.py", line 129, in do
    return getattr(self.registry(), name)(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/session.py", line 653, in commit
    self.transaction.commit()
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/session.py", line 364, in commit
    self._prepare_impl()
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/session.py", line 348, in _prepare_impl
    self.session.flush()
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/session.py", line 1346, in flush
    self._flush(objects)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/session.py", line 1427, in _flush
    flush_context.execute()
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/unitofwork.py", line 299, in execute
    rec.execute(self)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/unitofwork.py", line 443, in execute
    uow
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/mapper.py", line 1833, in _save_obj
    execute(statement, params)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1157, in execute
    params)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1237, in _execute_clauseelement
    return self.__execute_context(context)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1268, in __execute_context
    context.parameters[0], context=context)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1367, in _cursor_execute
    context)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1360, in _cursor_execute
    context)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/default.py", line 288, in do_execute
    cursor.execute(statement, parameters)
IntegrityError: (IntegrityError) authors.display_name may not be NULL u'INSERT INTO authors (first_name, last_name, display_name) VALUES (?, ?, ?)' (None, None, None)

Traceback (most recent call last):
  File "/home/meinert/Qt/OpenLP/trunk/openlp/plugins/songs/forms/editsongform.py", line 588, in onMaintenanceButtonClicked
    self.parent.song_maintenance_form.exec_()
  File "/home/meinert/Qt/OpenLP/trunk/openlp/plugins/songs/forms/songmaintenanceform.py", line 70, in exec_
    self.resetAuthors()
  File "/home/meinert/Qt/OpenLP/trunk/openlp/plugins/songs/forms/songmaintenanceform.py", line 106, in resetAuthors
    order_by_ref=Author.display_name)
  File "/home/meinert/Qt/OpenLP/trunk/openlp/core/lib/db.py", line 205, in get_all_objects
    return query.order_by(order_by_ref).all()
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1453, in all
    return list(self)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1565, in __iter__
    return self._execute_and_instances(context)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1570, in _execute_and_instances
    mapper=self._mapper_zero_or_none())
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/session.py", line 734, in execute
    return self._connection_for_bind(engine, close_with_result=True).execute(
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/session.py", line 699, in _connection_for_bind
    return self.transaction._connection_for_bind(engine)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/session.py", line 298, in _connection_for_bind
    self._assert_is_active()
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/session.py", line 233, in _assert_is_active
    "The transaction is inactive due to a rollback in a "
InvalidRequestError: The transaction is inactive due to a rollback in a subtransaction.  Issue rollback() to cancel the transaction.





References