← Back to team overview

openlp-core team mailing list archive

[Bug 1409031] Re: FTW hangs on "Downloading Resource Index" page

 

Adding retries += 1 to the else clause fixes this, however, the code
retries 4 times rather than 2 that is hard coded to CONNECTION_RETRIES.
setting retries to 1 and the if condition to retries >=
CONNECTION_RETRIES fixes the number of retries.

Finally the code calling get_web_page in the FTW is not in a try block
so eventually openlp will bug out with the above exception. We should
catch it displaying a friendly message to the user and allowing them to
proceed with the rest of the FTW (obviously we should skip the download
pages)


As mentioned I do not have a develpoment environment set up on the machine, so cannot try these things out in OpenLP, with my changes the code at http://bazaar.launchpad.net/~openlp-core/openlp/trunk/annotate/head:/openlp/core/utils/__init__.py#L404 becomes:


    retries = 1
    while True:
        try:
            page = urllib.request.urlopen(req, timeout=CONNECTION_TIMEOUT)
            log.debug('Downloaded URL = %s' % page.geturl())
        except (urllib.error.URLError, ConnectionError):
            if retries >= CONNECTION_RETRIES:
                log.exception('The web page could not be downloaded')
                raise
            else:
                retries += 1
                time.sleep(0.1)
                continue
        break

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

Title:
  FTW hangs on "Downloading Resource Index" page

Status in OpenLP - Worship Presentation Software:
  New

Bug description:
  Running OpenLP for the "First Time" (after clearing the registry,
  appdata and program files) OpenLP hangs in the FTW on  the
  "Downloading Resource Index" page. This prevents OpenLP from being
  started. The debug log does not contain any trackbacks or errors.

  I suspect this is to do with a gateway, or firewall, or somethintg
  blocking OpenLP from connecting to the network.

  Windows XP

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1409031/+subscriptions


References