Trying to get the values of the list into a spreadsheet, but it only seems to be printing when i place it as a string( meal = str(meal())). OTHERWISE GETTING an error,
gspread.exceptions.APIError: {
"error": {
"code": 400,
"message": "Invalid values[10][0]: list_value {\n values {\n string_value: \"Parmesan\"\n }\n values {\n string_value: \"Pan-seared\"\n }\n values {\n string_value: \"Oriental\"\n }\n}\n",
"status": "INVALID_ARGUMENT"
}
}
#the code I need help with
parm = self.parm.get()
pan = self.pan.get()
ori = self.ori.get()
buff = self.buff.get()
def meal():
selection = []
if (parm ==1):
selection.append("Parmesan")
if (pan ==1):
selection.append("Pan-seared")
if (ori ==1):
selection.append("Oriental")
if (buff ==1):
selection.append("Buffalo")
return selection
def total(meal):
mealTot = len(meal)
return mealTot
meal = meal()
global rowNum
order.update_cell(rowNum, 8, total(meal))