Python Forum
[PyQt] AttributeError: 'NoneType' object has no attribute 'text'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] AttributeError: 'NoneType' object has no attribute 'text'
#1
Hi,

        for x in secilen.indexes():
            satirlar = '{ "row" : 2, "column": 2 }'
            asdds = json.loads(satirlar)
            tablobul = self.ui.eklenenlerTablo.item(asdds["row"], asdds["column"])
            tets = tablobul.text()
            print(tets)
I am trying to pull item content from PyQT5 table with this code. But
tets = tablobul.text()
line gives an error.

AttributeError: 'NoneType' object has no attribute 'text'
   
What is the error reason and how can I solve it?
Reply


Messages In This Thread
AttributeError: 'NoneType' object has no attribute 'text' - by speedev - Sep-25-2021, 10:11 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  'NoneType' object has no attribute 'get' zunebuggy 8 1,571 Oct-13-2023, 06:39 PM
Last Post: zunebuggy
  tkinter AttributeError: 'GUI' object has no attribute pfdjhfuys 3 1,692 May-18-2023, 03:30 PM
Last Post: pfdjhfuys
  [Kivy] Windows 10: AttributeError: 'WM_PenProvider' object has no attribute 'hwnd' mikepy 1 2,423 Feb-20-2023, 09:26 PM
Last Post: deanhystad
  [Tkinter] Can't update label in new tk window, object has no attribute tompranks 3 3,679 Aug-30-2022, 08:44 AM
Last Post: tompranks
  [PyQt] Determining the format attributes on text in a QTextEdit object DrakeSoft 7 3,693 Apr-18-2022, 06:40 PM
Last Post: DrakeSoft
  AttributeError: 'NoneType' object has no attribute 'get' George87 5 15,753 Dec-23-2021, 04:47 AM
Last Post: George87
  [Tkinter] Glow text of clickable object on hover with transition andy 6 6,266 May-11-2021, 07:39 AM
Last Post: andy
  [Tkinter] AttributeError: '' object has no attribute 'tk' Maryan 2 14,884 Oct-29-2020, 11:57 PM
Last Post: Maryan
  [Tkinter] AttributeError: 'tuple' object has no attribute 'replace' linuxhacker 7 6,983 Aug-08-2020, 12:47 AM
Last Post: linuxhacker
  [Kivy] AttributeError: 'NoneType' object has no attribute 'bind' faszination_92 2 6,363 Apr-12-2020, 07:01 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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