Missing image in service causes traceback when opening

Bug #1065423 reported by Andreas Preikschat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
Fix Released
Medium
Phill

Bug Description

Hello,

arch linux, r2081

1) Add an image to the service.
2) Remove the image from your hard drive.
3) Save the Service.
4) Say "Yes" on the opening dialog "File missing from service"
5) Reopen the service

Result:
A traceback is shown.

Traceback (most recent call last):
  File "/home/andreas/Projects/OpenLP/trunk/openlp/core/ui/servicemanager.py", line 434, in onLoadServiceClicked
    self.loadFile(fileName)
  File "/home/andreas/Projects/OpenLP/trunk/openlp/core/ui/servicemanager.py", line 684, in loadFile
    serviceItem.set_from_service(item, self.servicePath)
  File "/home/andreas/Projects/OpenLP/trunk/openlp/core/lib/serviceitem.py", line 338, in set_from_service
    self.add_from_image(filename, text_image)
  File "/home/andreas/Projects/OpenLP/trunk/openlp/core/lib/serviceitem.py", line 222, in add_from_image
    path, ImageSource.ImagePlugin, self.image_border)
  File "/home/andreas/Projects/OpenLP/trunk/openlp/core/lib/imagemanager.py", line 291, in addImage
    image = Image(path, source, background)
  File "/home/andreas/Projects/OpenLP/trunk/openlp/core/lib/imagemanager.py", line 128, in __init__
    self.timestamp = os.stat(path).st_mtime
OSError: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/home/andreas/.openlp/data/servicemanager/Kopie von new17 (komplett).png'

Expected:
Good question. We should show the "red cross" icon. (But I am asking myself why somebody would want to save a service with a missing file? But that probably does not belong here.)

Related branches

Changed in openlp:
importance: Undecided → Medium
Phill (phill-ridout)
Changed in openlp:
status: New → Confirmed
Phill (phill-ridout)
Changed in openlp:
assignee: nobody → phill (phill-ridout)
status: Confirmed → In Progress
tags: added: service-manager
Phill (phill-ridout)
Changed in openlp:
status: In Progress → Fix Committed
Phill (phill-ridout)
Changed in openlp:
status: Fix Committed → In Progress
milestone: none → 2.0
Phill (phill-ridout)
Changed in openlp:
status: In Progress → Fix Committed
Tim Bentley (trb143)
Changed in openlp:
status: Fix Committed → Fix Released
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.