Typing a path for a theme background causes a key error

Bug #1197376 reported by Phill
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
Status tracked in Trunk
2.0
Fix Released
Medium
Tim Bentley
Trunk
Fix Released
Medium
Tim Bentley

Bug Description

Reported on the support system. I've also been able to reproduce this on Windows XP.

Create a new theme
Type a path to an image file in
Click next until you get to the last page
Give the theme a new name
Click Finish.
"Error Occureed" Dialog shows

Having had a quick look at the code it appears that although we validate that the line edit is not empty. We don't actually read out the contents anywhere. (When the File Open dialogue is used, the path is saved in to the self.theme.background_filename variable.)

It would probably be a good idea to validate that the file actually exists when leaving the background page of the wizard!

http://support.openlp.org/issues/1990

OpenLP Bug Report
Version: {u'full': u'2.0.1', u'version': u'2.0.1', u'build': None}

--- Details of the Exception. ---

Creating new theme with image background.

--- Exception Traceback ---
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/openlp/core/ui/themeform.py", line
645, in accept
    self.thememanager.saveTheme(self.theme, saveFrom, saveTo)
  File "/usr/lib/python2.7/site-packages/openlp/core/ui/thememanager.py", line
676, in saveTheme
    ImageSource.Theme, QtGui.QColor(theme.background_border_color))
  File "/usr/lib/python2.7/site-packages/openlp/core/lib/imagemanager.py",
line 228, in updateImageBorder
    image = self._cache[(path, source)]
KeyError: (u'', 2)
--- System information ---
Platform: Linux-3.7.10-1.4-desktop-x86_64-with-SuSE-12.3-x86_64
Desktop: KDE SC

--- Library Versions ---
Python: 2.7.3
Qt4: 4.8.4
Phonon: 4.6.0
PyQt4: 4.9.6
QtWebkit: 534.34
SQLAlchemy: 0.7.10
SQLAlchemy Migrate: 0.7.2
BeautifulSoup: 3.2.1
lxml: 2.3.4
Chardet: 2.1.1
PyEnchant: 1.6.5
PySQLite: -
Mako: 0.7.3
pyUNO bridge: 4.0

Related branches

Revision history for this message
Phill (phill-ridout) wrote :

Although I've targeted it to trunk, I've not been able to test it on trunk (hence not setting it to confirmed!)

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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