The FTW fails when network is disconnected during download

Bug #1422683 reported by Tomas Groth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
Fix Released
High
Ken Roberts

Bug Description

The FTW fails in 2 cases:
1. When network is disconnected while downloading data (song db, bibles, etc.) a traceback is not caught.
2. When network is disconnected while starting/doing threaded download of theme screenshot, OpenLP/FTW just hangs at the "downloading resource index file"-page.

Traceback when disconnecting while downloading song database:
Traceback (most recent call last):
  File "/home/tgc/OpenLP/trunk/openlp/core/ui/firsttimeform.py", line 346, in on_current_id_changed
    self._perform_wizard()
  File "/home/tgc/OpenLP/trunk/openlp/core/ui/firsttimeform.py", line 599, in _perform_wizard
    if not self._download_selected():
  File "/home/tgc/OpenLP/trunk/openlp/core/ui/firsttimeform.py", line 628, in _download_selected
    if not self.url_get_file('%s%s' % (self.songs_url, filename), destination, sha256):
  File "/home/tgc/OpenLP/trunk/openlp/core/ui/firsttimeform.py", line 412, in url_get_file
    data = url_file.read(block_size)
  File "/usr/lib/python3.4/http/client.py", line 500, in read
    return super(HTTPResponse, self).read(amt)
  File "/usr/lib/python3.4/http/client.py", line 539, in readinto
    n = self.fp.readinto(b)
  File "/usr/lib/python3.4/socket.py", line 371, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

Extract from the log when openlp hangs network is disconnected while starting/doing threaded download of theme screenshot
2015-02-17 10:29:00,951 openlp.core.common.__init__ DEBUG check_directory_exists /tmp/openlp
2015-02-17 10:29:02,826 openlp.core.OpenLP DEBUG Entering process_events
2015-02-17 10:29:02,830 openlp.core.OpenLP DEBUG Entering process_events
2015-02-17 10:29:02,831 openlp.core.OpenLP DEBUG Entering process_events
2015-02-17 10:29:02,851 openlp.core.OpenLP DEBUG Entering process_events
2015-02-17 10:29:02,864 openlp.core.OpenLP DEBUG Entering set_busy_cursor
2015-02-17 10:29:02,868 openlp.core.OpenLP DEBUG Entering process_events
2015-02-17 10:29:02,871 openlp.core.utils.__init__ DEBUG Downloading URL = http://openlp.org/files/frw/download.cfg
2015-02-17 10:29:03,043 openlp.core.utils.__init__ DEBUG Downloaded URL = http://openlp.org/files/frw/download.cfg
2015-02-17 10:29:03,043 openlp.core.utils.__init__ DEBUG <http.client.HTTPResponse object at 0x7fc6f3319400>
2015-02-17 10:29:03,056 openlp.core.OpenLP DEBUG Entering process_events
2015-02-17 10:29:03,060 openlp.core.lib.pluginmanager.PluginManager DEBUG Entering get_plugin_by_name
2015-02-17 10:29:03,061 openlp.core.lib.pluginmanager.PluginManager DEBUG Entering get_plugin_by_name
2015-02-17 10:29:03,061 openlp.core.lib.pluginmanager.PluginManager DEBUG Entering get_plugin_by_name
2015-02-17 10:29:03,061 openlp.core.lib.pluginmanager.PluginManager DEBUG Entering get_plugin_by_name
2015-02-17 10:29:03,062 openlp.core.lib.pluginmanager.PluginManager DEBUG Entering get_plugin_by_name
2015-02-17 10:29:03,062 openlp.core.lib.pluginmanager.PluginManager DEBUG Entering get_plugin_by_name
2015-02-17 10:29:03,062 openlp.core.lib.pluginmanager.PluginManager DEBUG Entering get_plugin_by_name
2015-02-17 10:29:03,062 openlp.core.lib.pluginmanager.PluginManager DEBUG Entering get_plugin_by_name
2015-02-17 10:29:03,063 openlp.core.lib.pluginmanager.PluginManager DEBUG Entering get_plugin_by_name
2015-02-17 10:29:03,063 openlp.core.OpenLP DEBUG Entering set_normal_cursor
2015-02-17 10:29:03,064 openlp.core.OpenLP DEBUG Entering process_events
2015-02-17 10:29:03,065 openlp.core.OpenLP DEBUG Entering process_events
2015-02-17 10:29:03,066 openlp.core.OpenLP DEBUG Entering process_events
2015-02-17 10:29:03,066 openlp.core.OpenLP DEBUG Entering process_events
2015-02-17 10:29:03,067 openlp.core.OpenLP DEBUG Entering process_events
2015-02-17 10:29:03,068 openlp.core.OpenLP DEBUG Entering process_events
2015-02-17 10:29:03,069 openlp.core.OpenLP DEBUG Entering process_events

Related branches

Ken Roberts (alisonken1)
Changed in openlp:
assignee: nobody → Ken Roberts (alisonken1)
importance: Undecided → High
Tomas Groth (tomasgroth)
description: updated
Tomas Groth (tomasgroth)
Changed in openlp:
status: New → In Progress
Tim Bentley (trb143)
Changed in openlp:
milestone: none → 2.1.3
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.