moses-palmer / pystray

GNU General Public License v3.0
482 stars 59 forks source link

Error with pillow 10.0.0 (macOS) #146

Closed kennedyshead closed 1 year ago

kennedyshead commented 1 year ago
Exception in thread Thread-6 (setup_handler):
Traceback (most recent call last):
  File "/usr/local/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/Users/magnusknutas/.local/share/virtualenvs/browser-OKsUx7wo/lib/python3.11/site-packages/sentry_sdk/integrations/threading.py", line 72, in run
    reraise(*_capture_exception())
  File "/Users/magnusknutas/.local/share/virtualenvs/browser-OKsUx7wo/lib/python3.11/site-packages/sentry_sdk/_compat.py", line 60, in reraise
    raise value
  File "/Users/magnusknutas/.local/share/virtualenvs/browser-OKsUx7wo/lib/python3.11/site-packages/sentry_sdk/integrations/threading.py", line 70, in run
    return old_run_func(self, *a, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/magnusknutas/.local/share/virtualenvs/browser-OKsUx7wo/lib/python3.11/site-packages/pystray/_base.py", line 396, in setup_handler
    self.visible = True
    ^^^^^^^^^^^^
  File "/Users/magnusknutas/.local/share/virtualenvs/browser-OKsUx7wo/lib/python3.11/site-packages/pystray/_base.py", line 184, in visible
    self._show()
  File "/Users/magnusknutas/.local/share/virtualenvs/browser-OKsUx7wo/lib/python3.11/site-packages/pystray/_darwin.py", line 67, in _show
    self._assert_image()
  File "/Users/magnusknutas/.local/share/virtualenvs/browser-OKsUx7wo/lib/python3.11/site-packages/pystray/_darwin.py", line 174, in _assert_image
    PIL.Image.ANTIALIAS))
    ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'PIL.Image' has no attribute ‘ANTIALIAS'
NicolasMICAUX commented 1 year ago

Very simple fix: https://stackoverflow.com/a/76616129 ANTIALIAS variable renamed to LANCZOS