Hênio Tierra Sampaio <heniots...@gmail.com> added the comment: I'm maintainer for a project for the RaspberryPi, a GUI for OMXPlayer called TBOPlayer. This GUI was originally made for Python 2, but with Python 2 deprecation, I decided to convert it to Python 3. After (supposedly) converting all of it I had a surprise to see that the events that worked in the original code with Python 2 didn't work anymore in Python 3 with errors like
File "/home/henio/Projetos/tboplayer/lib/tboplayer.py", line 1566, in select_track sel = event.widget.curselection() AttributeError: 'tuple' object has no attribute 'widget' And upon investigation, I noticed all the widget events (originally of type tkinter.Event) were now of type Tuple. WTF. Ok, I tried to circumvent this by using the tuple "attributes", like, in the event (('17685', '1', '??', '??', '??', '256', '59467466', '??', '212', '11', '??', '0', '??', '??', '.!listbox', '5', '1030', '344', '??'),) I can access the x position of the cursor in relation to the widget by doing: event[0][8] Which I did. However, I obviously cannot use any of the Event methods, and this way I cannot get the current selection from a Listbox, for example, and trying to gives me the exact error mentioned above. This renders TBOPlayer useless as the user cannot even select a track for playing. And unfortunately, I was unable to reproduce this issue with a minimum code, so I have no idea what's going on. This issue comment describes how to reproduce the bug inside of TBOPlyaer: https://github.com/KenT2/tboplayer/issues/175#issuecomment-600861514 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40011> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com