Author display name not populated

Bug #1668994 reported by Raoul Snyman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
Status tracked in Trunk
2.4
Fix Released
High
Raoul Snyman
Trunk
Fix Committed
High
Raoul Snyman

Bug Description

We're seeing a lot of this exception since 2.4.5, so it looks like we've introduced a big. I don't actually know how to repetisie it because all of the users reporting the bug swear blind that they did nothing wrong and don't know how to reproduce it.

--- Exception Traceback ---

Traceback (most recent call last):

  File "site-packages\sqlalchemy\engine\base.py", line 1182, in _execute_context

  File "site-packages\sqlalchemy\engine\default.py", line 470, in do_execute

sqlite3.IntegrityError: NOT NULL constraint failed: authors.display_name

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

  File "openlp\plugins\songs\forms\editsongform.py", line 1005, in accept

  File "openlp\plugins\songs\forms\editsongform.py", line 1063, in save_song

  File "openlp\core\lib\db.py", line 272, in save_object

  File "site-packages\sqlalchemy\orm\scoping.py", line 157, in do

  File "site-packages\sqlalchemy\orm\session.py", line 874, in commit

  File "site-packages\sqlalchemy\orm\session.py", line 461, in commit

  File "site-packages\sqlalchemy\orm\session.py", line 441, in _prepare_impl

  File "site-packages\sqlalchemy\orm\session.py", line 2139, in flush

  File "site-packages\sqlalchemy\orm\session.py", line 2259, in _flush

  File "site-packages\sqlalchemy\util\langhelpers.py", line 60, in __exit__

  File "site-packages\sqlalchemy\util\compat.py", line 187, in reraise

  File "site-packages\sqlalchemy\orm\session.py", line 2223, in _flush

  File "site-packages\sqlalchemy\orm\unitofwork.py", line 389, in execute

  File "site-packages\sqlalchemy\orm\unitofwork.py", line 548, in execute

  File "site-packages\sqlalchemy\orm\persistence.py", line 181, in save_obj

  File "site-packages\sqlalchemy\orm\persistence.py", line 835, in
_emit_insert_statements

  File "site-packages\sqlalchemy\engine\base.py", line 945, in execute

  File "site-packages\sqlalchemy\sql\elements.py", line 263, in _execute_on_connection

  File "site-packages\sqlalchemy\engine\base.py", line 1053, in _execute_clauseelement

  File "site-packages\sqlalchemy\engine\base.py", line 1189, in _execute_context

  File "site-packages\sqlalchemy\engine\base.py", line 1393, in _handle_dbapi_exception

  File "site-packages\sqlalchemy\util\compat.py", line 203, in raise_from_cause

  File "site-packages\sqlalchemy\util\compat.py", line 186, in reraise

  File "site-packages\sqlalchemy\engine\base.py", line 1182, in _execute_context

  File "site-packages\sqlalchemy\engine\default.py", line 470, in do_execute

sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) NOT NULL constraint failed:
authors.display_name [SQL: 'INSERT INTO authors (first_name, last_name, display_name)
VALUES (?, ?, ?)'] [parameters: (None, None, None)]

Related branches

Revision history for this message
Tomas Groth (tomasgroth) wrote :

This is caused by the off-by-1 error in the author drop-down selection.
To reproduce it do this:
1. Edit/create a song
2. Go to authors tab.
3. Choose the last author on list.
4. Click "Add to song" (and ignore that an empty author is added)
5. Click save.

Revision history for this message
MATTQMELLO (matt-qmello) wrote :

If you (like me) really need the fix for this bug and due to doesn't having a release that includes that fix (currently, for Ubuntu the latest release is 2.4.5-1~16.04) follow these instructions:
1. Close the OpenLP.
2. Go to your OpenLP Song Plugin folder (mine is "/usr/share/openlp/openlp/plugins/songs/forms");
3. Make a copy (backup) of the "editsongform.py" file;
4. Access and download the "editsongform.py" that contains the fix at this link: http://bazaar.launchpad.net/~openlp-core/openlp/2.4/view/head:/openlp/plugins/songs/forms/editsongform.py
5. Copy and overwrite the "editsongform.py" at your OpenLP Song Plugin folder;
6. And re-start OpenLP.

For me, it's working like a charm!
Thanks to the OpenLP team!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.