[issue44076] issue with list in Python 3.8.5

Mohamed report at bugs.python.org
Sat May 8 18:23:45 EDT 2021


Mohamed <allawatimr at gmail.com> added the comment:

I'm using tkinter for a long time, my application was running fine till 1st May, and suddenly happen this issue.

After adding a new data to a list, it showing in some places of tkinter components. For example, in treeview, it shows based on running specfic function, but on click it appear this message:

Traceback (most recent call last):
  File "C:\Users\xxxxxx\AppData\Local\Programs\Python\Python38-32\lib\tkinter\__init__.py", line 1883, in __call__
    return self.func(*args)
  File "xxxxxxx.py", line 1423, in OnDoubleClick
    itemXid = assetinfo_lst[xrec][1]
IndexError: list index out of range

in OnDoubleClick:
    xrec = self.treedata.selection()[0]
    xrec = int(xrec[1:], 16) - 1

    itemXid = assetinfo_lst[xrec][1]

However, after exiting the program and restarting it, it is working properly.

it could be the mainloop is not working:
if __name__ == "__main__":
    root = Tk()
    App = MasterApp(root)
    root.mainloop()

Is an issue with a new update of Windows 10? MS suggest to reinstall tkinter and recover Windows

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44076>
_______________________________________


More information about the Python-bugs-list mailing list