You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a "retry" option in the preset when Overpass fails #561
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.
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
Activity
Huntani commentedon Apr 9, 2026
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):
`
This solved the issue - even if the message box is not very nice