diff --git a/activity_browser/ui/wizards/project_setup_wizard.py b/activity_browser/ui/wizards/project_setup_wizard.py index a572f54b1..f917c5a13 100644 --- a/activity_browser/ui/wizards/project_setup_wizard.py +++ b/activity_browser/ui/wizards/project_setup_wizard.py @@ -148,7 +148,6 @@ def validatePage(self): release = ei.EcoinventRelease(settings) release.list_versions() - # logon was unsuccesful except requests.exceptions.HTTPError as e: QtWidgets.QApplication.restoreOverrideCursor() @@ -161,6 +160,16 @@ def validatePage(self): self.message.setText("Unknown connection error, try again later.") raise e + except requests.exceptions.ConnectionError: + QtWidgets.QApplication.restoreOverrideCursor() + self.message.setText("Cannot connect to the internet, please try again later.") + return False + + except Exception as e: + # restore cursor on all exceptions + QtWidgets.QApplication.restoreOverrideCursor() + raise e + # in case of success, set the settings for permanent use ei.permanent_setting("username", self.username.text()) ei.permanent_setting("password", self.password.text())