moses-palmer/pystray

Error left-click on the tray icon

jdima07 opened this issue · 1 comments

Hello!
Why do I get an error on windows when I left-click on the tray icon?

An error occurred when calling message handler
Traceback (most recent call last):
File "D:\Program Files\Python37\lib\site-packages\pystray_win32.py", line 402, in _dispatcher
uMsg, lambda w, l: 0)(wParam, lParam) or 0)
File "D:\Program Files\Python37\lib\site-packages\pystray_win32.py", line 190, in _on_notify
self()
File "D:\Program Files\Python37\lib\site-packages\pystray_base.py", line 104, in call
self._menu(self)
TypeError: 'tuple' object is not callable

I think a mistake in the call to the self._menu method, I do not understand why it is called if it is a tuple with menu objects.

Thank you for your report.

A temporary workaround is to pass an instance of Menu as the menu argument instead of a tuple. If you install pystray from the master branch, this has been fixed, so I will close this issue.