'Pyautocad iter object stops iteration

I have this error why? I have something like 2000 text and it just stop iterating after several one.

from pyautocad import Autocad
import comtypes
import regex, time
acad = Autocad()
textGroup = []
    
for i in acad.doc.Modelspace:
    print(i.ObjectName)
    time.sleep(0.01)

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source