Skip to content

Add a "retry" option in the preset when Overpass fails #561

Open

Description

@Huntani

Is your feature request related to a problem? Please describe

Problem description:

  • When a preset is run, any fault from Overpass causes the whole preset run to be interrupted.
    Presets including multiple requests (e.g. "Hiking") are sometimes impossible to complete, since it is enough for one of the requests to fail to cause the whole process to stop, and retrying requires restarting the whole preset

Describe the solution you'd like

Having a retry button whenever an overpass request fails.

Describe alternatives you've considered

Additional context

Activity

  1. Huntani commented on Apr 9, 2026

    @Huntani
    ContributorAuthor

    I tried to add a "retry" option in a quick and dirty method:

    In the "run" function of connexion_oapi.py I changed the original call to self.download() with the following:

    `
    """Try to download until the user aborts"""
    while(tryDownload):

            """Save the URL. The download function modifies it"""
            tmpUrl = self._url.url()
            LOGGER.info("Download trial #" + str(testN))
            self.download()
            tryDownload = False
    
            """Check for errors. If present, ask user to retry or abort"""
            if len(self.errors):
                mbox = QMessageBox()
                mbox.setWindowTitle("Overpass Error")
                mbox.setText("Overpass returned error:\n".join(self.errors))
                mbox.setStandardButtons(QMessageBox.Abort | QMessageBox.Retry)
                mboxReturn = mbox.exec()
    
                if(mboxReturn == QMessageBox.Retry):
                    """
                    If retry button is pressed, reset the URL 
                    to the original value, clear errors and retry
                    """
                    tryDownload = True
                    self._url.setUrl(tmpUrl)
                    self.errors = []
                    testN = testN + 1
    

    `

    This solved the issue - even if the message box is not very nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions