← Back to team overview

openlp-core team mailing list archive

[Bug 703073] Re: Crash when adding song with author filled in, but not added

 

** Changed in: openlp
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/703073

Title:
  Crash when adding song with author filled in, but not added

Status in OpenLP - Worship Presentation Software:
  Fix Released

Bug description:
  1. Open add new song dialog.
  2. Fill in title, add lyrics.
  3. Pick or type in an author, but don't add it yet.
  4. Press save.
  5. OpenLP gives you an alert about missing author.
  6. Add the author you typed in earlier (press the "Add to song" button).
  7. Voila, you get the following:

  Traceback (most recent call last):
    File "/home/mattias/Arendus/OpenLP/openlp/openlp/plugins/songs/forms/editsongform.py", line 346, in onAuthorAddButtonClicked
      author = self.manager.get_object(Author, item_id)
    File "/home/mattias/Arendus/OpenLP/openlp/openlp/core/lib/db.py", line 195, in get_object
      return self.session.query(object_class).get(key)
    File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 582, in get
      return self._get(key, ident)
    File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1836, in _get
      return q.one()
    File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1522, in one
      ret = list(self)
    File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1564, in __iter__
      self.session._autoflush()
    File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/session.py", line 877, in _autoflush
      self.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) songs.lyrics may not be NULL u'INSERT INTO songs (song_book_id, title, alternate_title, lyrics, verse_order, copyright, comments, ccli_number, song_number, theme_name, search_title, search_lyrics) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' (4, u'Emakene, kallis', u'', None, u'', u'', u'', u'', u'31', None, u'Emakene, kallis', None)


  8. If you ignore that one, (since in the UI author gets added anyway),
  you try to save the song, and you get more good news:

  Traceback (most recent call last):
    File "/home/mattias/Arendus/OpenLP/openlp/openlp/plugins/songs/forms/editsongform.py", line 676, in accept
      if self.saveSong():
    File "/home/mattias/Arendus/OpenLP/openlp/openlp/plugins/songs/forms/editsongform.py", line 703, in saveSong
      Book.name == book_name)
    File "/home/mattias/Arendus/OpenLP/openlp/openlp/core/lib/db.py", line 207, in get_object_filtered
      return self.session.query(object_class).filter(filter_clause).first()
    File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1496, in first
      ret = list(self[0:1])
    File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1405, in __getitem__
      return list(res)
    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