i am getting the following error:
index 0 has type 'tuple' but 'str' is expected
My list variable looks like this:
[('304',), ('316',), ('303',), ('BS S130',), ('Do Not Use',), ('17-4PH',), ('431S29',), ('416',), ('304',), ('316',), ('S143D',), ('15/5PH-H1025',), ('304S11',), ('316S11',), ('304L',), ('316L',), ('304S16',), ('BS S527',), ('316L',), ('316',), ('Misc',)]
def stainless_list(self):
stainless_getlist = []
content = 'SELECT grade FROM stainless ORDER BY prefix ASC'
res = conn.execute(content)
for row_index, row_data in enumerate(res):
stainless_getlist.append(row_data)
conn.close
self.comboBox_2.clear()
self.comboBox_2.addItems(stainless_getlist)
print(stainless_getlist)
return
How do i declare my list as a string instead of tuple so that it attaches to my combobox correctly?