thanks Joe! I changed pass
to return
; when I run the module and the window appears, it still says "Cannot run with these settings":
I then click on Settings. For some reasons, it shows Baseline as the default group and 10 as default MaxRSD, but nothing for default channel and ZScoreCutoff, even though I wrote in the script (with proper indentations, which doesn't show below):
def settingsWidget():
try:
qaqc.setDefaultSetting("GroupName", data.selectionGroupNames()[0])
qaqc.setDefaultSetting("ChannelName", data.timeSeriesNames()[0])
qaqc.setDefaultSetting("MaxRSD", 10)
qaqc.setDefaultSetting("ZScoreCutoff", 2)
except:
pass
I select Group G_BCR2G, and when I select Channel Input>Na23, the console displays this:
File "C:/Users/tonyd/Documents/iolite/Plugins/QA-QC/test.py", line 52, in update
img = QImage(bytes(plt.gcf().canvas.buffer_rgba()), w, h, QImage.Format_RGBA8888)
File "C:\Program Files (x86)/iolite-software/iolite4/python3.8/site-packages\matplotlib\backends/backend_agg.py", line 448, in buffer_rgba
return self.renderer.buffer_rgba()
AttributeError: 'FigureCanvasAgg' object has no attribute 'renderer'
Not sure what it doesn't like with img = QImage(bytes(plt.gcf().canvas.buffer_rgba()), w, h, QImage.Format_RGBA8888)
If I try clicking on Settings again, the widget doesn't appear and I get again: File "C:/Users/tonyd/Documents/iolite/Plugins/QA-QC/test.py", line 52, in update
img = QImage(bytes(plt.gcf().canvas.buffer_rgba()), w, h, QImage.Format_RGBA8888)
File "C:\Program Files (x86)/iolite-software/iolite4/python3.8/site-packages\matplotlib\backends/backend_agg.py", line 448, in buffer_rgba
return self.renderer.buffer_rgba()
AttributeError: 'FigureCanvasAgg' object has no attribute 'renderer'
I closed the window, re-ran the module and tried different combinations of channel and group; same error.