Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why does it return error?
#1
from tkinter import *
root = Tk()
root.title('First stage')
root.geometry('600x400')
Button(root, text = '1', width = 5, height = 3, bg = 'blue', fg = 'red', font = 'arial 14').place(x = 70, y = 32)
Label(text = 'Hallo', bg = 'yellow', fg = 'orange').place(x = 80, y = 10)
searching = Text(root, height = 4, width = 35, font = 'Arial 10').place(x = 90, y = 30)
searching.insert(1.0, 'It is good!\n')
root.mainloop()
Error:
Traceback (most recent call last):   File "C:/Users/Владелец/Desktop/програмирование/Tkinter.py", line 8, in <module>     searching.insert(1.0, 'It is good!\n') AttributeError: 'NoneType' object has no attribute 'insert'
Reply


Messages In This Thread
Why does it return error? - by Ponomarenko Pavlo - Feb-05-2017, 08:01 PM
RE: Why does it return error? - by Ofnuts - Feb-05-2017, 09:39 PM
RE: Why does it return error? - by Larz60+ - Feb-06-2017, 04:38 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Receiving this error in my "response" and causes script to return wrong status cubangt 18 2,275 Aug-13-2023, 12:16 AM
Last Post: cubangt
  return out of loops syntax error felixf 7 3,534 Nov-03-2020, 01:00 PM
Last Post: perfringo
  SystemError: error return without exception set!!! faryad13 3 3,808 Oct-23-2020, 02:32 PM
Last Post: ATARI_LIVE
  syntax error on return statement l_butler 5 3,190 May-31-2020, 02:26 PM
Last Post: pyzyx3qwerty
  Error with print and return commands TheDark_Knight 2 1,998 Jan-15-2020, 04:59 PM
Last Post: TheDark_Knight
  Python Error 'return self.attrs[key]' Need help! ahmedwaqas92 0 4,507 Oct-13-2019, 03:50 AM
Last Post: ahmedwaqas92

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020