Calling icon.stop() before caling icon.run() or icon.run_detached() throws an exception.
Traceback (most recent call last):
File "D:\Codes\Python\matrix\src\main.py", line 114, in <module>
icon.stop()
File "D:\Codes\Python\matrix\.venv\lib\site-packages\pystray\_base.py", line 248, in stop
if self._setup_thread.ident != threading.current_thread().ident:
AttributeError: 'Icon' object has no attribute '_setup_thread'
Calling
icon.stop()
before calingicon.run()
oricon.run_detached()
throws an exception.