add error message for bad output fext

This commit is contained in:
Yannik Schmidt
2022-03-06 14:00:43 +01:00
parent aad93a663d
commit 32c33700d1

View File

@@ -198,11 +198,16 @@ class WidgetGallery(QDialog):
endDateTime = dt.datetime.combine(self.endDateEdit.date().toPyDate(), zeroTime)
endDateTime += endTimeOffset
self.truePath = plot.plot(self.datapoints, path=target,
try:
self.truePath = plot.plot(self.datapoints, path=target,
date1=startDateTime,
date2=endDateTime,
forcePath=forcePath,
qtTextBrowser=self.infoTextBox)
except ValueError as e:
self.infoTextBox.append("ERROR: " + str(e))
self.buttonGo.setText(self.localization.button_go)
return
self.buttonGo.setText(self.localization.button_go)
self.buttonGo.setDisabled(False)