I am assigning a GUI variable to an excel sheet cell. I use PySimplegui, then read the values of that GUI, and openpyxl to write to my excel sheet. It always tells me
TypeError: 'NoneType' object is not subscriptable
no matter what.
import PySimpleGUI as sg
import openpyxl
wb = load_workbook(filename=template_sheet)
excel_sheet = wb['Sheet 1']
layout = [
sg.Input('Input Address here', key='_address_')
]
window = sg.window(layout)
excel_sheet['F9'] = values['_address_'] # THIS IS THE PROBLEM CHILD
I expect the values['_address_]
to be put in cell F9 of the excel sheet. Instead, it just tells me because values['_address_']
is Nonetype
(regardless of whether its filled in or not), it does not even try