ty-porter / RGBMatrixEmulator

A desktop interface to emulate Raspberry Pi-powered LED matrices driven by rpi-rgb-led-matrix
MIT License
89 stars 13 forks source link

AttributeError: type object 'Color' has no attribute 'to_tuple' #64

Closed yashgharat closed 9 months ago

yashgharat commented 9 months ago

I think in commit 487ed18 you got rid of to_tuple() and that broke the tkinter adapter. I am now getting the error

  File "RGBMatrixEmulator/adapters/tkinter_adapter.py", line 48, in draw_to_screen
    self.__canvas.itemconfig(shape_id, fill=Color.to_hex(pixel))
  File "RGBMatrixEmulator/graphics/color.py", line 18, in to_hex
    return "#%02x%02x%02x" % Color.to_tuple(pixel)
AttributeError: type object 'Color' has no attribute 'to_tuple'
yashgharat commented 9 months ago

Just confirmed, it works in version 0.10.0, but broken in 0.11.0

ty-porter commented 9 months ago

Thanks for the report, I was able to reproduce easily and fix is forthcoming soon in 0.11.2.

ty-porter commented 9 months ago

Resolved by #65