def readText():
    global data
mtext = ''
mtext = strJson.get()
mlabel2 = Label(myGui, text=mtext).place(x=180, y=200)
data = json.loads(mtext)
Reading a JSON string | TypeError: string indices must be integers