mlb-led-scoreboard icon indicating copy to clipboard operation
mlb-led-scoreboard copied to clipboard

Upcoming Pillow Deprecations

Open tracerrx opened this issue 8 months ago • 2 comments

We. need to fix the below, I haven't checked but pretty sure we only use this to display the logo on startup.

Mar 12 10:51:45 arb-sports main.py[2140]: bdfparser warning: unsafe_ptrs property is deprecated and will be removed in Pillow 12 (2025-10-15)

tracerrx avatar Mar 12 '25 14:03 tracerrx

This is being raised from https://github.com/hzeller/rpi-rgb-led-matrix/blob/d10f518f291bd34ca4816ef25cadf2446b882662/bindings/python/rgbmatrix/core.pyx#L44

We should report it upstream, but for our purposes I think it's totally fine to work around it by passing unsafe=False to matrix.SetImage here, which bypasses that code path and just does the dumb nested for-loop over pixels.

WardBrian avatar Mar 12 '25 15:03 WardBrian

https://github.com/hzeller/rpi-rgb-led-matrix/issues/1769

WardBrian avatar Mar 12 '25 15:03 WardBrian

New build throws error, crash on the setimage that Brian mentioned here.

Pillow is the same version on another board that is working fine, so perhaps this is around when the installation date was? Both boards showing the same version of pillow on pip show pillow

I'm not sure how to pass that param that Brian mentioned, but commenting out the line works to get past it.

Image

/home/pmo/mlb-led-scoreboard/venv/lib/python3.13/site-packages/pyowm/commons/cityidregistry.py:7: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. from pkg_resources import resource_filename INFO (01:24:27): MLB LED Scoreboard - v8.5.2 (64x32) DEBUG (01:24:27): Using rgbmatrix version 0.0.1 ERROR (01:24:27): Untrapped error in main! Traceback (most recent call last): File "/home/pmo/mlb-led-scoreboard/./main.py", line 168, in <module> main(matrix, config) ~~~~^^^^^^^^^^^^^^^^ File "/home/pmo/mlb-led-scoreboard/./main.py", line 68, in main matrix.SetImage(logo.convert("RGB")) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ File "core.pyx", line 21, in rgbmatrix.core.Canvas.SetImage File "core.pyx", line 44, in rgbmatrix.core.Canvas.SetPixelsPillow AttributeError: 'ImagingCore' object has no attribute 'unsafe_ptrs'

unwound29 avatar Oct 16 '25 05:10 unwound29