You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following error after minimizing the script to the tray. No idea what changed as the error was not there a few days ago.
Exception in thread Thread-1 (setup_handler):
Traceback (most recent call last):
File "C:\Users\Wok\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1052, in _bootstrap_inner
self.run()
File "C:\Users\Wok\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 989, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Wok\PycharmProjects\TwitchDropsMiner\.venv\Lib\site-packages\pystray\_base.py", line 400, in setup_handler
self.visible = True
^^^^^^^^^^^^
File "C:\Users\Wok\PycharmProjects\TwitchDropsMiner\.venv\Lib\site-packages\pystray\_base.py", line 184, in visible
self._show()
File "C:\Users\Wok\PycharmProjects\TwitchDropsMiner\.venv\Lib\site-packages\pystray\_win32.py", line 59, in _show
self._message(
File "C:\Users\Wok\PycharmProjects\TwitchDropsMiner\.venv\Lib\site-packages\pystray\_win32.py", line 337, in _message
win32.Shell_NotifyIcon(code, win32.NOTIFYICONDATAW(
^^^^^^^^^^^^^^^^^^^^^^
ValueError: string too long (132, maximum length 128)
The error going away doesn't resolve the underlying issue, which in this case appears to be a 128 characters limit on a tray icon title. This can apparently be exceeded, if a drop that's currently being mined has a long name, or belongs to a game that has a long name, or a combination of these two.
The simplest solution would be to just always trim the tray icon title down to <128 characters, but that'd just make it ugly and weirdly cut-off in these cases. A proper solution would be to always leave the main title and progress percentage up, while only trimming the drop's name. If that's isn't enough, then trim the game's name as well. Maybe the application title could be removed as well, solely to allow for more characters to be displayed. I'll try to put out a patch for this soon.
I get the following error after minimizing the script to the tray. No idea what changed as the error was not there a few days ago.
The text was updated successfully, but these errors were encountered: